]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: Switch to irq_domain_create_*()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 19 Mar 2025 09:29:07 +0000 (10:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 May 2025 19:06:08 +0000 (21:06 +0200)
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) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-15-jirislaby@kernel.org
arch/arm/common/sa1111.c
arch/arm/mach-exynos/suspend.c
arch/arm/mach-imx/avic.c
arch/arm/mach-imx/gpc.c
arch/arm/mach-imx/tzic.c
arch/arm/mach-omap1/irq.c
arch/arm/mach-omap2/omap-wakeupgen.c
arch/arm/mach-pxa/irq.c
arch/arm/plat-orion/gpio.c

index 9846f30990f71122b20e04314ed522bb45069b35..02eda44a6faa3b7229da71d661e561bc98ccc736 100644 (file)
@@ -416,9 +416,9 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
        writel_relaxed(~0, irqbase + SA1111_INTSTATCLR0);
        writel_relaxed(~0, irqbase + SA1111_INTSTATCLR1);
 
-       sachip->irqdomain = irq_domain_add_linear(NULL, SA1111_IRQ_NR,
-                                                 &sa1111_irqdomain_ops,
-                                                 sachip);
+       sachip->irqdomain = irq_domain_create_linear(NULL, SA1111_IRQ_NR,
+                                                    &sa1111_irqdomain_ops,
+                                                    sachip);
        if (!sachip->irqdomain) {
                irq_free_descs(sachip->irq_base, SA1111_IRQ_NR);
                return -ENOMEM;
index cac4e82f6c824f45d80a7c00db1ef8db2c3f49ec..150a1e56dcae92fc268fd7b567e71461081a188f 100644 (file)
@@ -209,9 +209,8 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
                return -ENOMEM;
        }
 
-       domain = irq_domain_add_hierarchy(parent_domain, 0, 0,
-                                         node, &exynos_pmu_domain_ops,
-                                         NULL);
+       domain = irq_domain_create_hierarchy(parent_domain, 0, 0, of_fwnode_handle(node),
+                                            &exynos_pmu_domain_ops, NULL);
        if (!domain) {
                iounmap(pmu_base_addr);
                pmu_base_addr = NULL;
index cf6546ddc7a3e70a359e800cb731aa65e44cb117..3067c06b4b8ebd920331974cf87a78e12ae53566 100644 (file)
@@ -201,8 +201,8 @@ static void __init mxc_init_irq(void __iomem *irqbase)
        WARN_ON(irq_base < 0);
 
        np = of_find_compatible_node(NULL, NULL, "fsl,avic");
-       domain = irq_domain_add_legacy(np, AVIC_NUM_IRQS, irq_base, 0,
-                                      &irq_domain_simple_ops, NULL);
+       domain = irq_domain_create_legacy(of_fwnode_handle(np), AVIC_NUM_IRQS, irq_base, 0,
+                                         &irq_domain_simple_ops, NULL);
        WARN_ON(!domain);
 
        for (i = 0; i < AVIC_NUM_IRQS / 32; i++, irq_base += 32)
index 5909088d54822d728e3e2f37c4156d930702dc12..2e633569d2f8954651807452ccc46cf014c21677 100644 (file)
@@ -245,9 +245,8 @@ static int __init imx_gpc_init(struct device_node *node,
        if (WARN_ON(!gpc_base))
                return -ENOMEM;
 
-       domain = irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS,
-                                         node, &imx_gpc_domain_ops,
-                                         NULL);
+       domain = irq_domain_create_hierarchy(parent_domain, 0, GPC_MAX_IRQS, of_fwnode_handle(node),
+                                            &imx_gpc_domain_ops, NULL);
        if (!domain) {
                iounmap(gpc_base);
                return -ENOMEM;
index 8b3d98d288d93e43f8025263d1a6d3c5b33cb242..50a5668e65d22ee9275351a34099a8abae1f97b4 100644 (file)
@@ -175,8 +175,8 @@ static int __init tzic_init_dt(struct device_node *np, struct device_node *p)
        irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id());
        WARN_ON(irq_base < 0);
 
-       domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0,
-                                      &irq_domain_simple_ops, NULL);
+       domain = irq_domain_create_legacy(of_fwnode_handle(np), TZIC_NUM_IRQS, irq_base, 0,
+                                         &irq_domain_simple_ops, NULL);
        WARN_ON(!domain);
 
        for (i = 0; i < 4; i++, irq_base += 32)
index 9b587ecebb1cca4d472b5729a303f09bd2c68e1d..bb1bc060ecd89bc97ce19426958e85f7a6d0daea 100644 (file)
@@ -220,8 +220,7 @@ void __init omap1_init_irq(void)
        omap_l2_irq = irq_base;
        omap_l2_irq -= NR_IRQS_LEGACY;
 
-       domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0,
-                                      &irq_domain_simple_ops, NULL);
+       domain = irq_domain_create_legacy(NULL, nr_irqs, irq_base, 0, &irq_domain_simple_ops, NULL);
 
        pr_info("Total of %lu interrupts in %i interrupt banks\n",
                nr_irqs, irq_bank_count);
index 6f0d6120c174e0b55f24b7d27e2681bc0aafce93..a66b1dc615713f8d9fc02f1d6e865318ab06217b 100644 (file)
@@ -585,9 +585,8 @@ static int __init wakeupgen_init(struct device_node *node,
                wakeupgen_ops = &am43xx_wakeupgen_ops;
        }
 
-       domain = irq_domain_add_hierarchy(parent_domain, 0, max_irqs,
-                                         node, &wakeupgen_domain_ops,
-                                         NULL);
+       domain = irq_domain_create_hierarchy(parent_domain, 0, max_irqs, of_fwnode_handle(node),
+                                            &wakeupgen_domain_ops, NULL);
        if (!domain) {
                iounmap(wakeupgen_base);
                return -ENOMEM;
index d9cadd97748a29537cc326f88a9fbc0e622aed32..5bfce8aa4102d76147edff91af7eafb7eb63de4f 100644 (file)
@@ -147,9 +147,8 @@ pxa_init_irq_common(struct device_node *node, int irq_nr,
        int n;
 
        pxa_internal_irq_nr = irq_nr;
-       pxa_irq_domain = irq_domain_add_legacy(node, irq_nr,
-                                              PXA_IRQ(0), 0,
-                                              &pxa_irq_ops, NULL);
+       pxa_irq_domain = irq_domain_create_legacy(of_fwnode_handle(node), irq_nr, PXA_IRQ(0), 0,
+                                                 &pxa_irq_ops, NULL);
        if (!pxa_irq_domain)
                panic("Unable to add PXA IRQ domain\n");
        irq_set_default_domain(pxa_irq_domain);
index 595e9cb33c1d2df0d43dfe8fbbdfe307e41b62b9..a15f474500849223f5ba9d0319436dc8c3349cf3 100644 (file)
@@ -602,12 +602,12 @@ void __init orion_gpio_init(int gpio_base, int ngpio,
                               IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
 
        /* Setup irq domain on top of the generic chip. */
-       ochip->domain = irq_domain_add_legacy(NULL,
-                                             ochip->chip.ngpio,
-                                             ochip->secondary_irq_base,
-                                             ochip->secondary_irq_base,
-                                             &irq_domain_simple_ops,
-                                             ochip);
+       ochip->domain = irq_domain_create_legacy(NULL,
+                                                ochip->chip.ngpio,
+                                                ochip->secondary_irq_base,
+                                                ochip->secondary_irq_base,
+                                                &irq_domain_simple_ops,
+                                                ochip);
        if (!ochip->domain)
                panic("%s: couldn't allocate irq domain (DT).\n",
                      ochip->chip.label);