imx6: add initial 3.12 support
[openwrt.git] / target / linux / imx6 / patches-3.12 / 0034-PCI-imx6-swizzle-interrupts.patch
1 From 73a0e49b562da9b06e487fb8e051075543495be5 Mon Sep 17 00:00:00 2001
2 From: Tim Harvey <tharvey@gateworks.com>
3 Date: Thu, 17 Oct 2013 15:50:48 -0700
4 Subject: [PATCH 1/5] PCI: imx6: swizzle interrupts
5
6
7 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
8 ---
9  drivers/pci/host/pcie-designware.c |    8 +++++++-
10  1 file changed, 7 insertions(+), 1 deletion(-)
11
12 --- a/drivers/pci/host/pcie-designware.c
13 +++ b/drivers/pci/host/pcie-designware.c
14 @@ -447,7 +447,13 @@ int dw_pcie_map_irq(const struct pci_dev
15  {
16         struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
17  
18 -       return pp->irq;
19 +       switch (pin) {
20 +       case 1: return pp->irq - 1;
21 +       case 2: return pp->irq - 2;
22 +       case 3: return pp->irq - 3;
23 +       case 4: return pp->irq;
24 +       default: return -1;
25 +       }
26  }
27  
28  static struct hw_pci dw_pci = {