cns3xxx: fix PCIe->PCI bridge access (fixes #18422)
authorFelix Fietkau <nbd@openwrt.org>
Thu, 27 Nov 2014 20:54:18 +0000 (20:54 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 27 Nov 2014 20:54:18 +0000 (20:54 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43414

target/linux/cns3xxx/patches-3.14/121-pcie_fix_bridge_access.patch [new file with mode: 0644]

diff --git a/target/linux/cns3xxx/patches-3.14/121-pcie_fix_bridge_access.patch b/target/linux/cns3xxx/patches-3.14/121-pcie_fix_bridge_access.patch
new file mode 100644 (file)
index 0000000..d3907bd
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/arch/arm/mach-cns3xxx/pcie.c
++++ b/arch/arm/mach-cns3xxx/pcie.c
+@@ -93,6 +93,8 @@ static void __iomem *cns3xxx_pci_cfg_bas
+       base = (void __iomem *)cnspci->cfg_bases[type].virtual;
+       offset = (devfn << 12) | (where & 0xffc);
++      if (busno > 1)
++              offset += busno << 20;
+       return base + offset;
+ }