Re: [RFC PATCH v1] irqchip: add support for SMP irq router

From: Jason Cooper
Date: Wed Jul 20 2016 - 09:57:01 EST


Hey Sebastian,

On Wed, Jul 20, 2016 at 01:42:45PM +0200, Sebastian Frias wrote:
> On 07/06/2016 06:28 PM, Jason Cooper wrote:
> > On Wed, Jul 06, 2016 at 01:37:21PM +0200, Sebastian Frias wrote:
> >> On 07/05/2016 06:16 PM, Jason Cooper wrote:
> >>>> Come to think of it, I'm not sure the *name* of the file documenting
> >>>> a binding is as important to DT maintainers as the compatible string.
> >>>
> >>> Correct. devicetee compatible strings need to be as specific as
> >>> possible.
> >>
> >> Specific with respect to what thing? To the HW module they are describing
> >> (USB, IRQ controller, etc.) or to the chip the HW module it is embedded
> >> into?
> >
> > The compatible string uniquely identifies an interface between an IP
> > block and the software (the devicetree binding). We use the most
> > specific model number or name we can for that IP block when we create
> > the binding and the compatible string.
>
> Ok, so we agree that the string identifies the HW block itself, and not the
> chip in which it is embedded into.

If *possible*. When we converted kirkwood and the other legacy Marvell
ARMv5 SoCs to devicetree, the most specific way we could identify the
irq controller was 'marvell,orion-intc'. Orion being the name of the
first platform it was seen on.

When that was chosen, mv68xx0, orion5x, kirkwood, and I think dove were
already deployed to market. So we had a *lot* more latent information
to look at.

Now that SoC manufacturers are doing a much better job mainlining code,
the situation is reversed. There's little information on what is
actually delivered to the market (because code is getting posted *prior*
to SoC deployment), but we have better access to specifications and
software devs.

So, if we have access to specific IP block identifiers, we'll use them.
If we don't, we're not going to let that hold up the train waiting for
the 'perfect' binding.

> >> A SoC is composed of several HW modules, some are shared among different
> >> manufacturers (i.e.: "generic-xhci"), and some are shared among different
> >> product lines of the same manufacturer (i.e.: "sigma,smp,irqrouter").
> >
> > Yes, that's why it's critical to be specific. We want to reuse drivers
> > where it makes sense. We can if the interface is the same.
>
> Ok, so is "sigma,smp,irqrouter" good or not?

If you have a unique identifier for the irqchip, use it. If not, the
convention is to use the identifier of the SoC.

thx,

Jason.