Skip to content

Commit 0810f12

Browse files
Jiri Slaby (SUSE)KAGA-KOKO
authored andcommitted
MIPS: 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). Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent a36aa0f commit 0810f12

File tree

7 files changed

+25
-23
lines changed

7 files changed

+25
-23
lines changed

arch/mips/ath25/ar2315.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ void __init ar2315_arch_init_irq(void)
149149

150150
ath25_irq_dispatch = ar2315_irq_dispatch;
151151

152-
domain = irq_domain_add_linear(NULL, AR2315_MISC_IRQ_COUNT,
153-
&ar2315_misc_irq_domain_ops, NULL);
152+
domain = irq_domain_create_linear(NULL, AR2315_MISC_IRQ_COUNT,
153+
&ar2315_misc_irq_domain_ops, NULL);
154154
if (!domain)
155155
panic("Failed to add IRQ domain");
156156

arch/mips/ath25/ar5312.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ void __init ar5312_arch_init_irq(void)
143143

144144
ath25_irq_dispatch = ar5312_irq_dispatch;
145145

146-
domain = irq_domain_add_linear(NULL, AR5312_MISC_IRQ_COUNT,
147-
&ar5312_misc_irq_domain_ops, NULL);
146+
domain = irq_domain_create_linear(NULL, AR5312_MISC_IRQ_COUNT,
147+
&ar5312_misc_irq_domain_ops, NULL);
148148
if (!domain)
149149
panic("Failed to add IRQ domain");
150150

arch/mips/cavium-octeon/octeon-irq.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,8 +1503,8 @@ static int __init octeon_irq_init_ciu(
15031503
/* Mips internal */
15041504
octeon_irq_init_core();
15051505

1506-
ciu_domain = irq_domain_add_tree(
1507-
ciu_node, &octeon_irq_domain_ciu_ops, dd);
1506+
ciu_domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_irq_domain_ciu_ops,
1507+
dd);
15081508
irq_set_default_domain(ciu_domain);
15091509

15101510
/* CIU_0 */
@@ -1637,8 +1637,8 @@ static int __init octeon_irq_init_gpio(
16371637
if (gpiod) {
16381638
/* gpio domain host_data is the base hwirq number. */
16391639
gpiod->base_hwirq = base_hwirq;
1640-
irq_domain_add_linear(
1641-
gpio_node, 16, &octeon_irq_domain_gpio_ops, gpiod);
1640+
irq_domain_create_linear(of_fwnode_handle(gpio_node), 16,
1641+
&octeon_irq_domain_gpio_ops, gpiod);
16421642
} else {
16431643
pr_warn("Cannot allocate memory for GPIO irq_domain.\n");
16441644
return -ENOMEM;
@@ -2074,8 +2074,8 @@ static int __init octeon_irq_init_ciu2(
20742074
/* Mips internal */
20752075
octeon_irq_init_core();
20762076

2077-
ciu_domain = irq_domain_add_tree(
2078-
ciu_node, &octeon_irq_domain_ciu2_ops, NULL);
2077+
ciu_domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_irq_domain_ciu2_ops,
2078+
NULL);
20792079
irq_set_default_domain(ciu_domain);
20802080

20812081
/* CUI2 */
@@ -2331,11 +2331,12 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node,
23312331
}
23322332
host_data->max_bits = val;
23332333

2334-
cib_domain = irq_domain_add_linear(ciu_node, host_data->max_bits,
2335-
&octeon_irq_domain_cib_ops,
2336-
host_data);
2334+
cib_domain = irq_domain_create_linear(of_fwnode_handle(ciu_node),
2335+
host_data->max_bits,
2336+
&octeon_irq_domain_cib_ops,
2337+
host_data);
23372338
if (!cib_domain) {
2338-
pr_err("ERROR: Couldn't irq_domain_add_linear()\n");
2339+
pr_err("ERROR: Couldn't irq_domain_create_linear()\n");
23392340
return -ENOMEM;
23402341
}
23412342

@@ -2918,8 +2919,8 @@ static int __init octeon_irq_init_ciu3(struct device_node *ciu_node,
29182919
* Initialize all domains to use the default domain. Specific major
29192920
* blocks will overwrite the default domain as needed.
29202921
*/
2921-
domain = irq_domain_add_tree(ciu_node, &octeon_dflt_domain_ciu3_ops,
2922-
ciu3_info);
2922+
domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_dflt_domain_ciu3_ops,
2923+
ciu3_info);
29232924
for (i = 0; i < MAX_CIU3_DOMAINS; i++)
29242925
ciu3_info->domain[i] = domain;
29252926

arch/mips/lantiq/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
377377
for (i = 0; i < MAX_IM; i++)
378378
irq_set_chained_handler(i + 2, ltq_hw_irq_handler);
379379

380-
ltq_domain = irq_domain_add_linear(node,
380+
ltq_domain = irq_domain_create_linear(of_fwnode_handle(node),
381381
(MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE,
382382
&irq_domain_ops, 0);
383383

arch/mips/pci/pci-ar2315.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ static int ar2315_pci_probe(struct platform_device *pdev)
469469
if (err)
470470
return err;
471471

472-
apc->domain = irq_domain_add_linear(NULL, AR2315_PCI_IRQ_COUNT,
473-
&ar2315_pci_irq_domain_ops, apc);
472+
apc->domain = irq_domain_create_linear(NULL, AR2315_PCI_IRQ_COUNT,
473+
&ar2315_pci_irq_domain_ops, apc);
474474
if (!apc->domain) {
475475
dev_err(dev, "failed to add IRQ domain\n");
476476
return -ENOMEM;

arch/mips/pci/pci-rt3883.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,10 @@ static int rt3883_pci_irq_init(struct device *dev,
208208
rt3883_pci_w32(rpc, 0, RT3883_PCI_REG_PCIENA);
209209

210210
rpc->irq_domain =
211-
irq_domain_add_linear(rpc->intc_of_node, RT3883_PCI_IRQ_COUNT,
212-
&rt3883_pci_irq_domain_ops,
213-
rpc);
211+
irq_domain_create_linear(of_fwnode_handle(rpc->intc_of_node),
212+
RT3883_PCI_IRQ_COUNT,
213+
&rt3883_pci_irq_domain_ops,
214+
rpc);
214215
if (!rpc->irq_domain) {
215216
dev_err(dev, "unable to add IRQ domain\n");
216217
return -ENODEV;

arch/mips/ralink/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static int __init intc_of_init(struct device_node *node,
176176
/* route all INTC interrupts to MIPS HW0 interrupt */
177177
rt_intc_w32(0, INTC_REG_TYPE);
178178

179-
domain = irq_domain_add_legacy(node, RALINK_INTC_IRQ_COUNT,
179+
domain = irq_domain_create_legacy(of_fwnode_handle(node), RALINK_INTC_IRQ_COUNT,
180180
RALINK_INTC_IRQ_BASE, 0, &irq_domain_ops, NULL);
181181
if (!domain)
182182
panic("Failed to add irqdomain");

0 commit comments

Comments
 (0)