From 69f205d335fe7f18c6293c60c259c05633b58209 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 20 Apr 2016 14:47:41 -0700 Subject: [PATCH] imx6: pci: revert OF irq mapping back to 3.10 (r649) Revert OF irq mapping technique for the 3.14 kernel as it requires newer devicetrees. Instead, revert back to the 3.10 kernel way of determining legacy irq mappings (r532). Signed-off-by: Pushpal Sidhu see: http://trac.gateworks.com/changeset/649 --- ...ignware_revert-pcie-map-irq-function.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 target/linux/imx6/patches-3.14/207-pci_designware_revert-pcie-map-irq-function.patch diff --git a/target/linux/imx6/patches-3.14/207-pci_designware_revert-pcie-map-irq-function.patch b/target/linux/imx6/patches-3.14/207-pci_designware_revert-pcie-map-irq-function.patch new file mode 100644 index 00000000000..03566fdcd50 --- /dev/null +++ b/target/linux/imx6/patches-3.14/207-pci_designware_revert-pcie-map-irq-function.patch @@ -0,0 +1,24 @@ +Index: linux-3.14.16/drivers/pci/host/pcie-designware.c +=================================================================== +--- linux-3.14.16.orig/drivers/pci/host/pcie-designware.c 2014-10-23 15:59:17.978240312 -0700 ++++ linux-3.14.16/drivers/pci/host/pcie-designware.c 2014-10-23 16:04:32.478231239 -0700 +@@ -744,9 +744,16 @@ + struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); + int irq; + +- irq = of_irq_parse_and_map_pci(dev, slot, pin); +- if (!irq) +- irq = pp->irq; ++ switch (pin) { ++ case 1: irq = pp->irq; break; ++ case 2: irq = pp->irq - 1; break; ++ case 3: irq = pp->irq - 2; break; ++ case 4: irq = pp->irq - 3; break; ++ default: irq = -1; break; ++ } ++ ++ dev_info(&dev->dev, "map_irq: %04x:%04x slot%d pin%d irq%d\n", ++ dev->vendor, dev->device, slot, pin, irq); + + return irq; + }