Re: [PATCH v2 2/2] irqchip: al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver

From: Marc Zyngier
Date: Thu Jun 06 2019 - 03:14:37 EST

On Wed, 05 Jun 2019 23:02:13 +0100,
Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 2019-06-05 at 13:22 +0100, Marc Zyngier wrote:
> >
> > > + * This is generally fixed depending on what pieces of HW it's wired up
> > > + * to.
> > > + *
> > > + * We configure it based on the sensitivity of the first source
> > > + * being setup, and reject any subsequent attempt at configuring it in a
> > > + * different way.
> >
> > Is that a reliable guess? It also strikes me that the DT binding doesn't
> > allow for the trigger type to be passed, meaning the individual drivers
> > have to request the trigger as part of their request_irq() call. I'd
> > rather you have a complete interrupt specifier in DT, and document the
> > various limitations of the HW.
> Actually the DT does, but Talel forgot to update the "example" part of
> the binding patch. The description does say 2 cells.

Yeah, I missed that and only read the example.

> This is the best approach imho (translation: I asked Talel to do it
> this way :-) The other option which I don't like is to stick to
> #interrupt-cells = 1, and have a separate property in the interrupt
> controller node to indicate whether it needs to be configured as level
> or edge.

Right, that's what I was suggesting in a separate email.

> These FICs are used for what is generally fixed wires inside the SoC,
> so it doesn't matter much either way, but I prefer having it self
> configured based on source just in case a future implementation doesn't
> have the limitation of all inputs having the same trigger type.

Fair enough. But it should be pretty easy to verify statically that
all interrupt specifiers targeting this interrupt controller have a
similar type.

RobH, is that something the yaml thing could do for us?



Jazz is not dead, it just smells funny.