Navigation Menu

Skip to content

Commit

Permalink
imx6: pci: revert OF irq mapping back to 3.10 (r649)
Browse files Browse the repository at this point in the history
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 <psidhu@gateworks.com>

see: http://trac.gateworks.com/changeset/649
  • Loading branch information
Gateworks committed Apr 25, 2016
1 parent 053b62d commit 69f205d
Showing 1 changed file with 24 additions and 0 deletions.
@@ -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;
}

0 comments on commit 69f205d

Please sign in to comment.