]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
irqchip/imx-mu-msi: Convert to msi_create_parent_irq_domain() helper
authorMarc Zyngier <maz@kernel.org>
Thu, 26 Jun 2025 14:49:01 +0000 (16:49 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 3 Jul 2025 13:49:24 +0000 (15:49 +0200)
Now that we have a concise helper to create an MSI parent domain,
switch the IMX letter soup over to that.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Nam Cao <tglx@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/all/4f05fff99b6cc5875d2f4dadd31707e2dedaafc8.1750860131.git.namcao@linutronix.de
Link: https://lore.kernel.org/all/20241204124549.607054-7-maz@kernel.org
drivers/irqchip/irq-imx-mu-msi.c

index 137da1927d144403d9aec5ba1b507bfba97f07ed..d2a4e8a61a42b1316ae9983195fa14f592b83c6d 100644 (file)
@@ -223,21 +223,21 @@ static const struct msi_parent_ops imx_mu_msi_parent_ops = {
 
 static int imx_mu_msi_domains_init(struct imx_mu_msi *msi_data, struct device *dev)
 {
-       struct fwnode_handle *fwnodes = dev_fwnode(dev);
+       struct irq_domain_info info = {
+               .ops            = &imx_mu_msi_domain_ops,
+               .fwnode         = dev_fwnode(dev),
+               .size           = IMX_MU_CHANS,
+               .host_data      = msi_data,
+       };
        struct irq_domain *parent;
 
        /* Initialize MSI domain parent */
-       parent = irq_domain_create_linear(fwnodes, IMX_MU_CHANS,
-                                         &imx_mu_msi_domain_ops, msi_data);
+       parent = msi_create_parent_irq_domain(&info, &imx_mu_msi_parent_ops);
        if (!parent) {
                dev_err(dev, "failed to create IRQ domain\n");
                return -ENOMEM;
        }
-
-       irq_domain_update_bus_token(parent, DOMAIN_BUS_NEXUS);
        parent->dev = parent->pm_dev = dev;
-       parent->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
-       parent->msi_parent_ops = &imx_mu_msi_parent_ops;
        return 0;
 }