Re: [PATCH V2] PCI: exynos: add support for MSI

From: Arnd Bergmann
Date: Sun Aug 25 2013 - 16:28:48 EST


On Friday 23 August 2013, Thierry Reding wrote:
> > > + if (IS_ENABLED(CONFIG_PCI_MSI)) {
> > > + if (of_property_read_u32(np, "msi-base", &pp->msi_irq_start)) {
> > > + dev_err(pp->dev, "Failed to parse the number of lanes\n");
> > > + return -EINVAL;
> > > + }
> > > + }
> > > +
> >
> > What if an implementor want to use irq_domain method for msi_irq_start
> > allocation? Is it fine to return error if msi-base is not passed from
> > dt?
>
> I agree. This should be using an IRQ domain to represent the MSI
> controller. Both Tegra and Marvell drivers do that already and if Exynos
> can follow that same path it will increase the chances of refactoring
> common bits.
>
> Also the error message doesn't quite match up with what the code is
> doing. =)

Agreed. Besides the encoding of "base" irq values in the device tree is always
wrong, since the numbers are not at all a hardware property but an implementation
detail of how Linux currently uses interrupt numbers. When using DT probing,
you *have* to use IRQ domains, and the rest of Exynos does that.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/