1 From: Tim Harvey <tharvey@gateworks.com>
2 Subject: [PATCH] PCI: imx6: add support for legacy irqs
4 The i.MX6 supports legacy IRQ's via 155,154,153,152. When devices
5 are behind a PCIe-to-PCIe switch (at least for the TI XIO2001) the
6 mapping is reversed from when they are behind a PCIe switch.
8 This patch still needs some review and clarification before going
11 drivers/pci/host/pcie-designware.c | 21 ++++++++++++++++++++-
12 1 file changed, 20 insertions(+), 1 deletion(-)
14 --- a/drivers/pci/host/pcie-designware.c
15 +++ b/drivers/pci/host/pcie-designware.c
16 @@ -711,7 +711,26 @@ static int dw_pcie_map_irq(const struct
18 struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
21 + /* TI XIO2001 PCIe-to-PCI bridge IRQs are flipped it seems */
22 + if ( dev->bus && dev->bus->self
23 + && (dev->bus->self->vendor == 0x104c)
24 + && (dev->bus->self->device == 0x8240)) {
26 + case 1: return pp->irq - 3;
27 + case 2: return pp->irq - 2;
28 + case 3: return pp->irq - 1;
29 + case 4: return pp->irq;
34 + case 1: return pp->irq;
35 + case 2: return pp->irq - 1;
36 + case 3: return pp->irq - 2;
37 + case 4: return pp->irq - 3;
43 static void dw_pcie_add_bus(struct pci_bus *bus)