P1023 external IRQ[4:6, 11] do not pin out, but the interrupts are
shared with PCIe controller.
The silicon internally ties the interrupts to L, so change the
IRQ[4:6,11] to high level sensitive for PCIe.
Signed-off-by: Roy Zang <redacted>
---
arch/powerpc/boot/dts/p1023rds.dts | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
From: Scott Wood <hidden> Date: 2011-11-07 18:44:59
On 11/07/2011 02:32 AM, Roy Zang wrote:
P1023 external IRQ[4:6, 11] do not pin out, but the interrupts are
shared with PCIe controller.
The silicon internally ties the interrupts to L, so change the
IRQ[4:6,11] to high level sensitive for PCIe.
Some extra commentary on why this works would be nice.
The manual says:
If a PCI Express INTx interrupt is being used, then the PIC must be configured so that external interrupts
are level-sensitive (EIVPRn[S] = 1).
and
In general, these signals should be considered mutually exclusive. If a PCI Express INTx signal is being
used, the PIC must be configured so that external interrupts are level sensitive (EIVPRn[S] = 1). If an IRQn
signal is being used as edge-triggered (EIVPRn[S] = 0), the system must not allow inbound PCI Express
INTx transactions.
Note that it is possible to share IRQn and INTx if the external interrupt is level sensitive; however, if an
interrupt occurs, the interrupt service routine must poll both the external sources connected to the IRQn
input and the PCI Express INTx sources to determine from which path the external interrupt came. In any
case, IRQn should be pulled to the negated state as determined by the associated polarity setting in
EIVPRn[P].
So it looks like there's some magic whereby the configuration of the
MPIC affects how the PCIe feeds the interrupt in.
Is there (or will there be) an erratum, or anything in the manual
besides not being documented as external interrupts, about these
specific interrupts being tied low in silicon or needing to be active high?
-Scott
From: Scott Wood <hidden> Date: 2011-11-08 16:54:59
On 11/07/2011 11:51 PM, Zang Roy-R61911 wrote:
quoted
-----Original Message-----
From: Wood Scott-B07421
Sent: Tuesday, November 08, 2011 2:44 AM
To: Zang Roy-R61911
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/p1023: set IRQ[4:6, 11] to high level sensitive for
PCIe
On 11/07/2011 02:32 AM, Roy Zang wrote:
quoted
P1023 external IRQ[4:6, 11] do not pin out, but the interrupts are
shared with PCIe controller.
The silicon internally ties the interrupts to L, so change the
IRQ[4:6,11] to high level sensitive for PCIe.
Some extra commentary on why this works would be nice.
I do not know what kind of extra commentary you request.
Just a note that there's magic to allow the PCIe block to output these
interrupts as either active-high or active-low, depending on how they're
configured at the mpic.
IRQ 4,5,6, 11 are internally tie to low by silicon. To use these interrupts for PCIe, they need to set high level sensitive.
It is clear enough for this patch.
It's odd enough that I felt the need to go reading through the docs to
see why such a thing would work at all.
quoted
The manual says:
quoted
If a PCI Express INTx interrupt is being used, then the PIC must be configured
so that external interrupts
quoted
are level-sensitive (EIVPRn[S] = 1).
That is true for all FSL powerpc silicon with PCIe controller beside P1023.
Sure, my point was more that it didn't say anything there about how to
configure EIVPRn[P].
-Scott
From: Scott Wood <hidden> Date: 2011-11-09 15:38:27
On Wed, Nov 09, 2011 at 09:27:02AM -0600, Zang Roy-R61911 wrote:
quoted
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, November 09, 2011 0:54 AM
To: Zang Roy-R61911
Cc: Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/p1023: set IRQ[4:6, 11] to high level sensitive for
PCIe
Just a note that there's magic to allow the PCIe block to output these
interrupts as either active-high or active-low, depending on how they're
configured at the mpic.
I do not think there is any magic.
On the contrary, it is the mpic/device tree needs to comply with the hardware setting for the interrupt polarity.
The magic is that the PCIe block can generate the interrupt in either
polarity depending on the MPIC setting (or perhaps it bases it on
sampling the pin status during/after reset, but that seems fragile).
quoted
quoted
IRQ 4,5,6, 11 are internally tie to low by silicon. To use these interrupts
for PCIe, they need to set high level sensitive.
quoted
It is clear enough for this patch.
It's odd enough that I felt the need to go reading through the docs to
see why such a thing would work at all.
If you consider the normal case, the shared irq pulls up, the PCIe interrupt set to low level sensitive. Anything odd?
The oddity is that active-high works at all for a PCI interrupt, and that
not all the PCIe interrupts have the same polarity.
-Scott
From: Kumar Gala <hidden> Date: 2011-11-09 15:50:01
How did you come by this information?
- k
On Nov 7, 2011, at 2:32 AM, Roy Zang wrote:
quoted hunk
P1023 external IRQ[4:6, 11] do not pin out, but the interrupts are
shared with PCIe controller.
The silicon internally ties the interrupts to L, so change the
IRQ[4:6,11] to high level sensitive for PCIe.
=20
Signed-off-by: Roy Zang <redacted>
---
arch/powerpc/boot/dts/p1023rds.dts | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
=20
From: Kumar Gala <hidden> Date: 2011-11-15 21:51:35
On Nov 7, 2011, at 2:32 AM, Roy Zang wrote:
quoted hunk
P1023 external IRQ[4:6, 11] do not pin out, but the interrupts are
shared with PCIe controller.
The silicon internally ties the interrupts to L, so change the
IRQ[4:6,11] to high level sensitive for PCIe.
=20
Signed-off-by: Roy Zang <redacted>
---
arch/powerpc/boot/dts/p1023rds.dts | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
=20
Should be setting ALL PCIe interrupts to '2'? As I think in general we =
say these PCIe are 'active high'. The only reason I would think we =
would NOT do this is if they are shared with some external device that =
is 'active low'. If so we should comment that somewhere (maybe in the =
.dts, maybe just in the commit message).
- k
From: Scott Wood <hidden> Date: 2011-11-15 22:15:15
On 11/15/2011 03:51 PM, Kumar Gala wrote:
On Nov 7, 2011, at 2:32 AM, Roy Zang wrote:
Should be setting ALL PCIe interrupts to '2'? As I think in general
we say these PCIe are 'active high'. The only reason I would think
we would NOT do this is if they are shared with some external device
that is 'active low'. If so we should comment that somewhere (maybe
in the .dts, maybe just in the commit message).
I'd assume the ones that are pinned out are pulled high on the board.
Active-low is normal, it's these non-pinned-out "external" interrupts
that are pulled low inside the SoC that are weird.
-Scott
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, November 16, 2011 6:14 AM
To: Kumar Gala
Cc: Zang Roy-R61911; linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/p1023: set IRQ[4:6, 11] to high level
sensitive for PCIe
=20
On 11/15/2011 03:51 PM, Kumar Gala wrote:
quoted
On Nov 7, 2011, at 2:32 AM, Roy Zang wrote:
Should be setting ALL PCIe interrupts to '2'? As I think in general
we say these PCIe are 'active high'. The only reason I would think
we would NOT do this is if they are shared with some external device
that is 'active low'. If so we should comment that somewhere (maybe
in the .dts, maybe just in the commit message).
=20
I'd assume the ones that are pinned out are pulled high on the board.
yes. The boards pulled up the shared IRQs. PCIe specification does not spec=
ify 'active low' or 'active high', but for PCI, the INTx is 'active low'.
Active-low is normal, it's these non-pinned-out "external" interrupts
that are pulled low inside the SoC that are weird.
I agree here. Do you want me to add something to point out the "weird" in t=
he commit message?
Thanks.
Roy