diff options
author | Luka Perkov <luka@openwrt.org> | 2014-02-12 00:46:00 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-02-12 00:46:00 +0000 |
commit | 601386d76ddb3d7d23fc064267f67a8269949cf5 (patch) | |
tree | cd02444735ea48d463930011b16c8e4a0e894c42 /target/linux/imx6/patches-3.13/200-PCI-imx6-add-support-for-legacy-irqs.patch | |
parent | 9d93ca72fb57f4df455518c1a7f891b1585cc0d4 (diff) | |
download | upstream-601386d76ddb3d7d23fc064267f67a8269949cf5.tar.gz upstream-601386d76ddb3d7d23fc064267f67a8269949cf5.tar.bz2 upstream-601386d76ddb3d7d23fc064267f67a8269949cf5.zip |
imx6: add initial 3.13 support
Signed-off-by: Luka Perkov <luka@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39573 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/imx6/patches-3.13/200-PCI-imx6-add-support-for-legacy-irqs.patch')
-rw-r--r-- | target/linux/imx6/patches-3.13/200-PCI-imx6-add-support-for-legacy-irqs.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/imx6/patches-3.13/200-PCI-imx6-add-support-for-legacy-irqs.patch b/target/linux/imx6/patches-3.13/200-PCI-imx6-add-support-for-legacy-irqs.patch new file mode 100644 index 0000000000..23e94a96a5 --- /dev/null +++ b/target/linux/imx6/patches-3.13/200-PCI-imx6-add-support-for-legacy-irqs.patch @@ -0,0 +1,43 @@ +From: Tim Harvey <tharvey@gateworks.com> +Subject: [PATCH] PCI: imx6: add support for legacy irqs + +The i.MX6 supports legacy IRQ's via 155,154,153,152. When devices +are behind a PCIe-to-PCIe switch (at least for the TI XIO2001) the +mapping is reversed from when they are behind a PCIe switch. + +This patch still needs some review and clarification before going +upstream. +--- + drivers/pci/host/pcie-designware.c | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +--- a/drivers/pci/host/pcie-designware.c ++++ b/drivers/pci/host/pcie-designware.c +@@ -711,7 +711,26 @@ static int dw_pcie_map_irq(const struct + { + struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); + +- return pp->irq; ++ /* TI XIO2001 PCIe-to-PCI bridge IRQs are flipped it seems */ ++ if ( dev->bus && dev->bus->self ++ && (dev->bus->self->vendor == 0x104c) ++ && (dev->bus->self->device == 0x8240)) { ++ switch (pin) { ++ case 1: return pp->irq - 3; ++ case 2: return pp->irq - 2; ++ case 3: return pp->irq - 1; ++ case 4: return pp->irq; ++ default: return -1; ++ } ++ } else { ++ switch (pin) { ++ case 1: return pp->irq; ++ case 2: return pp->irq - 1; ++ case 3: return pp->irq - 2; ++ case 4: return pp->irq - 3; ++ default: return -1; ++ } ++ } + } + + static void dw_pcie_add_bus(struct pci_bus *bus) |