Changeset 45718


Ignore:
Timestamp:
2015-05-23T17:25:59+02:00 (3 years ago)
Author:
blogic
Message:

lantiq: Fix initialization of the PCI IRQs when PCIe is also enabled

There are already ifx_pcie_bios_{map_irq,plat_dev_init} hooks defined in
ifxmips_pcie.c. Instead of defining a new hook we simply re-use the
existing ones (this is basically what the lantiq BSP code does).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/lantiq/patches-3.18/0001-MIPS-lantiq-add-pcie-driver.patch

    r45717 r45718  
    175175--- a/arch/mips/pci/fixup-lantiq.c 
    176176+++ b/arch/mips/pci/fixup-lantiq.c 
    177 @@ -11,11 +11,12 @@ 
     177@@ -8,12 +8,18 @@ 
     178  
     179 #include <linux/of_irq.h> 
     180 #include <linux/of_pci.h> 
     181+#include "ifxmips_pci_common.h" 
    178182  
    179183 int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL; 
    180184 int (*ltq_pci_plat_dev_init)(struct pci_dev *dev) = NULL; 
    181 +int (*ltq_pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); 
    182185  
    183186 int pcibios_plat_dev_init(struct pci_dev *dev) 
    184187 { 
     188+#ifdef CONFIG_PCIE_LANTIQ 
     189+       if (pci_find_capability(dev, PCI_CAP_ID_EXP)) 
     190+               ifx_pcie_bios_plat_dev_init(dev); 
     191+#endif 
     192+ 
    185193        if (ltq_pci_plat_arch_init) 
    186 -               return ltq_pci_plat_arch_init(dev); 
    187 +               ltq_pci_plat_arch_init(dev); 
     194                return ltq_pci_plat_arch_init(dev); 
    188195  
    189         if (ltq_pci_plat_dev_init) 
    190                 return ltq_pci_plat_dev_init(dev); 
    191 @@ -25,5 +26,7 @@ int pcibios_plat_dev_init(struct pci_dev 
     196@@ -25,5 +31,10 @@ 
    192197  
    193198 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
    194199 { 
    195 +       if (ltq_pci_map_irq) 
    196 +               return ltq_pci_map_irq(dev, slot, pin); 
     200+#ifdef CONFIG_PCIE_LANTIQ 
     201+       if (pci_find_capability(dev, PCI_CAP_ID_EXP)) 
     202+               return ifx_pcie_bios_map_irq(dev, slot, pin); 
     203+#endif 
     204+ 
    197205        return of_irq_parse_and_map_pci(dev, slot, pin); 
    198206 } 
     
    250258+#endif /* COFNIG_IFX_PCI */ 
    251259+ 
    252 +#ifdef CONFIG_IFX_PCIE 
     260+#ifdef CONFIG_PCIE_LANTIQ 
    253261+extern int ifx_pcie_bios_map_irq(IFX_PCI_CONST struct pci_dev *dev, u8 slot, u8 pin); 
    254262+extern int ifx_pcie_bios_plat_dev_init(struct pci_dev *dev); 
     
    259267--- /dev/null 
    260268+++ b/arch/mips/pci/ifxmips_pcie.c 
    261 @@ -0,0 +1,1099 @@ 
     269@@ -0,0 +1,1092 @@ 
    262270+/* 
    263271+ *  This program is free software; you can redistribute it and/or modify it 
     
    13071315+} 
    13081316+ 
    1309 +extern int (*ltq_pci_plat_arch_init)(struct pci_dev *dev); 
    1310 +extern int (*ltq_pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); 
    1311 + 
    13121317+static int __init ifx_pcie_bios_init(void) 
    13131318+{ 
     
    13151320+    int pcie_port; 
    13161321+    int startup_port; 
    1317 + 
    1318 + 
    1319 +       ltq_pci_map_irq = ifx_pcie_bios_map_irq; 
    1320 +       ltq_pci_plat_arch_init = ifx_pcie_bios_plat_dev_init; 
    13211322+ 
    13221323+    /* Enable AHB Master/ Slave */ 
Note: See TracChangeset for help on using the changeset viewer.