Message ID | 20241204124549.607054-7-maz@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | irqchip: MSI parent cleanup and PCI host driver conversion | expand |
On Wed, Dec 04, 2024 at 12:45:44PM +0000, Marc Zyngier wrote: > 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> Reviewed-by: Frank Li <Frank.Li@nxp.com> > --- > drivers/irqchip/irq-imx-mu-msi.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/irqchip/irq-imx-mu-msi.c b/drivers/irqchip/irq-imx-mu-msi.c > index b3f656c6e7708..b73968423bb9f 100644 > --- a/drivers/irqchip/irq-imx-mu-msi.c > +++ b/drivers/irqchip/irq-imx-mu-msi.c > @@ -226,17 +226,15 @@ static int imx_mu_msi_domains_init(struct imx_mu_msi *msi_data, struct device *d > 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(fwnodes, &imx_mu_msi_parent_ops, > + &imx_mu_msi_domain_ops, 0, > + IMX_MU_CHANS, msi_data, NULL); > 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; > } > > -- > 2.39.2 >
diff --git a/drivers/irqchip/irq-imx-mu-msi.c b/drivers/irqchip/irq-imx-mu-msi.c index b3f656c6e7708..b73968423bb9f 100644 --- a/drivers/irqchip/irq-imx-mu-msi.c +++ b/drivers/irqchip/irq-imx-mu-msi.c @@ -226,17 +226,15 @@ static int imx_mu_msi_domains_init(struct imx_mu_msi *msi_data, struct device *d 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(fwnodes, &imx_mu_msi_parent_ops, + &imx_mu_msi_domain_ops, 0, + IMX_MU_CHANS, msi_data, NULL); 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; }
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> --- drivers/irqchip/irq-imx-mu-msi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)