From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] PCI: imx6: ventana: fixup for IRQ mismapping
Date: Fri, 28 Feb 2014 10:39:57 -0700 [thread overview]
Message-ID: <20140228173957.GC7773@obsidianresearch.com> (raw)
In-Reply-To: <7755759.E1g1jlxbyc@wuerfel>
On Fri, Feb 28, 2014 at 10:27:13AM +0100, Arnd Bergmann wrote:
> On Thursday 27 February 2014 17:19:54 Tim Harvey wrote:
> > The TI XIO2001 PCIe-to-PCI bridge used on Ventana expansion boards
> > has its slot-to-bridge IRQ mapping reversed from the PCI specification:
> >
> > INTA->INTD
> > INTB->INTC
> > INTC->INTB
> > INTD->INTA
> >
> > Implement a custom swizzle function that does a fixup on the interrupt for
> > devices on the first TI XIO2001 bridge in the tree.
> >
>
> I'm pretty sure you can express that by using a more specific
> 'interrupt-map' property that defines the correct mapping for
> the PCIe-to-PCI bridge in the board file.
Yes, the correct way to handle this is to define a stanza for the
PCIe-PCI bridge and then place an interrupt map in that stanza that
describes the downstream translation.
Nobody should be messing with IRQ numbers in code on DT platforms.
DTs using the mvebu driver have an example of this:
pcie-controller {
compatible = "marvell,kirkwood-pcie";
status = "disabled";
device_type = "pci";
pcie at 1,0 {
device_type = "pci";
reg = <0x0800 0 0 0 0>;
^^^^^^^ This is the PCI device
ID of the bridge
interrupt-map-mask = <0 0 0 0>;
interrupt-map = <0 0 0 0 &intc 9>;
Which says 'INTA/B/C/D of devices downstream of bridge 00:01.0 map to
&intc input 9'
In particular, this is probably not a TI XIO2001 problem, but a board
design problem - the swizzle rules were not properly followed when
wiring up the PCI ISDEL and INTx pins on the downstream PCI bus.
Jason
next prev parent reply other threads:[~2014-02-28 17:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 1:19 [RFC PATCH 0/3] PCI: imx6: fixup for add-in card IRQ mismapping Tim Harvey
2014-02-28 1:19 ` [PATCH 1/3] PCI: designware: add legacy PCI interrupt mapping Tim Harvey
2014-02-28 2:00 ` Jingoo Han
2014-02-28 4:24 ` Tim Harvey
2014-02-28 7:01 ` Jingoo Han
2014-02-28 10:12 ` Marek Vasut
2014-02-28 11:27 ` Lucas Stach
2014-02-28 11:37 ` Arnd Bergmann
2014-02-28 12:09 ` Lucas Stach
2014-02-28 12:27 ` Arnd Bergmann
2014-02-28 13:53 ` Lucas Stach
2014-02-28 2:10 ` Shawn Guo
2014-02-28 1:19 ` [PATCH 2/3] PCI: designware: add ability for custom swizzle Tim Harvey
2014-02-28 1:19 ` [PATCH 3/3] PCI: imx6: ventana: fixup for IRQ mismapping Tim Harvey
2014-02-28 2:10 ` Jingoo Han
2014-02-28 9:27 ` Arnd Bergmann
2014-02-28 17:39 ` Jason Gunthorpe [this message]
2014-03-01 0:52 ` Tim Harvey
2014-03-01 1:22 ` Jason Gunthorpe
2014-03-03 19:59 ` Tim Harvey
2014-03-03 23:37 ` Jason Gunthorpe
2014-03-04 0:38 ` Tim Harvey
2014-03-04 1:01 ` Jason Gunthorpe
2014-02-28 1:50 ` [RFC PATCH 0/3] PCI: imx6: fixup for add-in card " Jingoo Han
2014-02-28 4:16 ` Tim Harvey
2014-02-28 6:22 ` Jingoo Han
2014-02-28 10:15 ` Marek Vasut
2014-02-28 16:52 ` Tim Harvey
2014-02-28 16:55 ` Lucas Stach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140228173957.GC7773@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).