aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/imx6/patches-3.10/0034-PCI-imx6-add-support-for-legacy-irqs.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-10-30 23:31:26 +0000
committerLuka Perkov <luka@openwrt.org>2013-10-30 23:31:26 +0000
commit672a8cd6ba72820f24a02dd237edaec3cd8973c5 (patch)
treebc721f84fd39a89e6881ddf06389b8ac0ab87d5f /target/linux/imx6/patches-3.10/0034-PCI-imx6-add-support-for-legacy-irqs.patch
parent8effe85ada423f2b61d863befd6e9b2430851d2d (diff)
downloadupstream-672a8cd6ba72820f24a02dd237edaec3cd8973c5.tar.gz
upstream-672a8cd6ba72820f24a02dd237edaec3cd8973c5.tar.bz2
upstream-672a8cd6ba72820f24a02dd237edaec3cd8973c5.zip
imx6: update patches
Changes include PCI fixes and various upstream pending patches. Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 38624
Diffstat (limited to 'target/linux/imx6/patches-3.10/0034-PCI-imx6-add-support-for-legacy-irqs.patch')
-rw-r--r--target/linux/imx6/patches-3.10/0034-PCI-imx6-add-support-for-legacy-irqs.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/imx6/patches-3.10/0034-PCI-imx6-add-support-for-legacy-irqs.patch b/target/linux/imx6/patches-3.10/0034-PCI-imx6-add-support-for-legacy-irqs.patch
new file mode 100644
index 0000000000..1f81e4338c
--- /dev/null
+++ b/target/linux/imx6/patches-3.10/0034-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
+@@ -447,7 +447,26 @@ int dw_pcie_map_irq(const struct pci_dev
+ {
+ 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 struct hw_pci dw_pci = {