[OpenWrt-Devel] [PATCH] lantiq: Fix PCIe bus when PCI is also enabled.

Martin Blumenstingl martin.blumenstingl at googlemail.com
Mon May 11 15:07:39 EDT 2015


The PCIe bus seems to require a hack/workaround when PCI is enabled as
well. Unfortunately this is guarded by an CONFIG_IFX_PCI ifdef, which is
only defined in lantiq's BSP code. The config symbol for the upstream
lantiq PCI driver is CONFIG_PCI_LANTIQ.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
---
 .../0001-MIPS-lantiq-add-pcie-driver.patch           | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/target/linux/lantiq/patches-3.18/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-3.18/0001-MIPS-lantiq-add-pcie-driver.patch
index 2cc0814..26f262c 100644
--- a/target/linux/lantiq/patches-3.18/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-3.18/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -4115,11 +4115,11 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +{
 +    u32 tbus_number = bus_number;
 +
-+#ifdef CONFIG_IFX_PCI
++#ifdef CONFIG_PCI_LANTIQ
 +    if (pcibios_host_nr() > 1) {
 +        tbus_number -= pcibios_1st_host_bus_nr();
 +    }
-+#endif /* CONFIG_IFX_PCI */
++#endif /* CONFIG_PCI_LANTIQ */
 +    return tbus_number;
 +}
 +
@@ -4141,14 +4141,14 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +    }
 +
 +    if (read) { /* Read hack */
-+    #ifdef CONFIG_IFX_PCI
++    #ifdef CONFIG_PCI_LANTIQ
 +        if (pcibios_host_nr() > 1) {
 +            tvalue = ifx_pcie_bus_enum_read_hack(where, tvalue);
 +        }
-+    #endif /* CONFIG_IFX_PCI */  
++    #endif /* CONFIG_PCI_LANTIQ */
 +    }
 +    else { /* Write hack */
-+    #ifdef CONFIG_IFX_PCI    
++    #ifdef CONFIG_PCI_LANTIQ
 +        if (pcibios_host_nr() > 1) {
 +            tvalue = ifx_pcie_bus_enum_write_hack(where, tvalue);
 +        }
@@ -5457,11 +5457,11 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +{
 +    u32 tbus_number = bus_number;
 +
-+#ifdef CONFIG_IFX_PCI
++#ifdef CONFIG_PCI_LANTIQ
 +    if (pcibios_host_nr() > 1) {
 +        tbus_number -= pcibios_1st_host_bus_nr();
 +    }
-+#endif /* CONFIG_IFX_PCI */
++#endif /* CONFIG_PCI_LANTIQ */
 +    return tbus_number;
 +}
 +
@@ -5483,14 +5483,14 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +    }
 +
 +    if (read) { /* Read hack */
-+    #ifdef CONFIG_IFX_PCI
++    #ifdef CONFIG_PCI_LANTIQ
 +        if (pcibios_host_nr() > 1) {
 +            tvalue = ifx_pcie_bus_enum_read_hack(where, tvalue);
 +        }
-+    #endif /* CONFIG_IFX_PCI */  
++    #endif /* CONFIG_PCI_LANTIQ */
 +    }
 +    else { /* Write hack */
-+    #ifdef CONFIG_IFX_PCI    
++    #ifdef CONFIG_PCI_LANTIQ
 +        if (pcibios_host_nr() > 1) {
 +            tvalue = ifx_pcie_bus_enum_write_hack(where, tvalue);
 +        }
-- 
2.4.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list