Skip to content

Commit bf9935e

Browse files
Jiri Slaby (SUSE)KAGA-KOKO
authored andcommitted
powerpc: Switch to irq_domain_create_*()
irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> # For 8xx Link: https://lore.kernel.org/all/[email protected]
1 parent 219182f commit bf9935e

File tree

21 files changed

+45
-33
lines changed

21 files changed

+45
-33
lines changed

arch/powerpc/platforms/44x/uic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node)
254254
}
255255
uic->dcrbase = *dcrreg;
256256

257-
uic->irqhost = irq_domain_add_linear(node, NR_UIC_INTS, &uic_host_ops,
258-
uic);
257+
uic->irqhost = irq_domain_create_linear(of_fwnode_handle(node),
258+
NR_UIC_INTS, &uic_host_ops,
259+
uic);
259260
if (! uic->irqhost)
260261
return NULL; /* FIXME: panic? */
261262

arch/powerpc/platforms/512x/mpc5121_ads_cpld.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void)
188188

189189
cpld_pic_node = of_node_get(np);
190190

191-
cpld_pic_host = irq_domain_add_linear(np, 16, &cpld_pic_host_ops, NULL);
191+
cpld_pic_host = irq_domain_create_linear(of_fwnode_handle(np), 16,
192+
&cpld_pic_host_ops, NULL);
192193
if (!cpld_pic_host) {
193194
printk(KERN_ERR "CPLD PIC: failed to allocate irq host!\n");
194195
goto end;

arch/powerpc/platforms/52xx/media5200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)
168168

169169
spin_lock_init(&media5200_irq.lock);
170170

171-
media5200_irq.irqhost = irq_domain_add_linear(fpga_np,
171+
media5200_irq.irqhost = irq_domain_create_linear(of_fwnode_handle(fpga_np),
172172
MEDIA5200_NUM_IRQS, &media5200_irq_ops, &media5200_irq);
173173
if (!media5200_irq.irqhost)
174174
goto out;

arch/powerpc/platforms/52xx/mpc52xx_gpt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)
247247
if (!cascade_virq)
248248
return;
249249

250-
gpt->irqhost = irq_domain_add_linear(node, 1, &mpc52xx_gpt_irq_ops, gpt);
250+
gpt->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 1, &mpc52xx_gpt_irq_ops, gpt);
251251
if (!gpt->irqhost) {
252-
dev_err(gpt->dev, "irq_domain_add_linear() failed\n");
252+
dev_err(gpt->dev, "irq_domain_create_linear() failed\n");
253253
return;
254254
}
255255

arch/powerpc/platforms/52xx/mpc52xx_pic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)
446446
* As last step, add an irq host to translate the real
447447
* hw irq information provided by the ofw to linux virq
448448
*/
449-
mpc52xx_irqhost = irq_domain_add_linear(picnode,
449+
mpc52xx_irqhost = irq_domain_create_linear(of_fwnode_handle(picnode),
450450
MPC52xx_IRQ_HIGHTESTHWIRQ,
451451
&mpc52xx_irqhost_ops, NULL);
452452

arch/powerpc/platforms/85xx/socrates_fpga_pic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)
278278
int i;
279279

280280
/* Setup an irq_domain structure */
281-
socrates_fpga_pic_irq_host = irq_domain_add_linear(pic,
281+
socrates_fpga_pic_irq_host = irq_domain_create_linear(of_fwnode_handle(pic),
282282
SOCRATES_FPGA_NUM_IRQS, &socrates_fpga_pic_host_ops, NULL);
283283
if (socrates_fpga_pic_irq_host == NULL) {
284284
pr_err("FPGA PIC: Unable to allocate host\n");

arch/powerpc/platforms/8xx/cpm1-ic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)
110110

111111
out_be32(&data->reg->cpic_cimr, 0);
112112

113-
data->host = irq_domain_add_linear(dev->of_node, 64, &cpm_pic_host_ops, data);
113+
data->host = irq_domain_create_linear(of_fwnode_handle(dev->of_node),
114+
64, &cpm_pic_host_ops, data);
114115
if (!data->host)
115116
return -ENODEV;
116117

arch/powerpc/platforms/8xx/pic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)
146146
if (!siu_reg)
147147
goto out;
148148

149-
mpc8xx_pic_host = irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, NULL);
149+
mpc8xx_pic_host = irq_domain_create_linear(of_fwnode_handle(np), 64,
150+
&mpc8xx_pic_host_ops, NULL);
150151
if (!mpc8xx_pic_host)
151152
printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n");
152153

arch/powerpc/platforms/embedded6xx/flipper-pic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)
149149

150150
__flipper_quiesce(io_base);
151151

152-
irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS,
153-
&flipper_irq_domain_ops, io_base);
152+
irq_domain = irq_domain_create_linear(of_fwnode_handle(np),
153+
FLIPPER_NR_IRQS,
154+
&flipper_irq_domain_ops, io_base);
154155
if (!irq_domain) {
155156
pr_err("failed to allocate irq_domain\n");
156157
return NULL;

arch/powerpc/platforms/embedded6xx/hlwd-pic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)
175175

176176
__hlwd_quiesce(io_base);
177177

178-
irq_domain = irq_domain_add_linear(np, HLWD_NR_IRQS,
179-
&hlwd_irq_domain_ops, io_base);
178+
irq_domain = irq_domain_create_linear(of_fwnode_handle(np),
179+
HLWD_NR_IRQS,
180+
&hlwd_irq_domain_ops, io_base);
180181
if (!irq_domain) {
181182
pr_err("failed to allocate irq_domain\n");
182183
iounmap(io_base);

0 commit comments

Comments
 (0)