|
|
@@ -1470,7 +1470,7 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+
|
|
|
--- /dev/null
|
|
|
+++ b/arch/mips/pci/ifxmips_pcie_ar10.h
|
|
|
-@@ -0,0 +1,290 @@
|
|
|
+@@ -0,0 +1,305 @@
|
|
|
+/****************************************************************************
|
|
|
+ Copyright (c) 2010
|
|
|
+ Lantiq Deutschland GmbH
|
|
|
@@ -1722,6 +1722,21 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+ return tbus_number;
|
|
|
+}
|
|
|
+
|
|
|
++static struct pci_dev *ifx_pci_get_slot(struct pci_bus *bus, unsigned int devfn)
|
|
|
++{
|
|
|
++ struct pci_dev *dev;
|
|
|
++
|
|
|
++ list_for_each_entry(dev, &bus->devices, bus_list) {
|
|
|
++ if (dev->devfn == devfn)
|
|
|
++ goto out;
|
|
|
++ }
|
|
|
++
|
|
|
++ dev = NULL;
|
|
|
++ out:
|
|
|
++ pci_dev_get(dev);
|
|
|
++ return dev;
|
|
|
++}
|
|
|
++
|
|
|
+static inline u32
|
|
|
+ifx_pcie_bus_enum_hack(struct pci_bus *bus, u32 devfn, int where, u32 value, int pcie_port, int read)
|
|
|
+{
|
|
|
@@ -1729,7 +1744,7 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+ u32 tvalue = value;
|
|
|
+
|
|
|
+ /* Sanity check */
|
|
|
-+ pdev = pci_get_slot(bus, devfn);
|
|
|
++ pdev = ifx_pci_get_slot(bus, devfn);
|
|
|
+ if (pdev == NULL) {
|
|
|
+ return tvalue;
|
|
|
+ }
|
|
|
@@ -3860,7 +3875,7 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+
|
|
|
--- /dev/null
|
|
|
+++ b/arch/mips/pci/ifxmips_pcie_vr9.h
|
|
|
-@@ -0,0 +1,269 @@
|
|
|
+@@ -0,0 +1,284 @@
|
|
|
+/****************************************************************************
|
|
|
+ Copyright (c) 2010
|
|
|
+ Lantiq Deutschland GmbH
|
|
|
@@ -4094,6 +4109,21 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+ return tbus_number;
|
|
|
+}
|
|
|
+
|
|
|
++static inline struct pci_dev *ifx_pci_get_slot(struct pci_bus *bus, unsigned int devfn)
|
|
|
++{
|
|
|
++ struct pci_dev *dev;
|
|
|
++
|
|
|
++ list_for_each_entry(dev, &bus->devices, bus_list) {
|
|
|
++ if (dev->devfn == devfn)
|
|
|
++ goto out;
|
|
|
++ }
|
|
|
++
|
|
|
++ dev = NULL;
|
|
|
++ out:
|
|
|
++ pci_dev_get(dev);
|
|
|
++ return dev;
|
|
|
++}
|
|
|
++
|
|
|
+static inline u32
|
|
|
+ifx_pcie_bus_enum_hack(struct pci_bus *bus, u32 devfn, int where, u32 value, int pcie_port, int read)
|
|
|
+{
|
|
|
@@ -4101,7 +4131,7 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+ u32 tvalue = value;
|
|
|
+
|
|
|
+ /* Sanity check */
|
|
|
-+ pdev = pci_get_slot(bus, devfn);
|
|
|
++ pdev = ifx_pci_get_slot(bus, devfn);
|
|
|
+ if (pdev == NULL) {
|
|
|
+ return tvalue;
|
|
|
+ }
|
|
|
@@ -4165,7 +4195,7 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+EXPORT_SYMBOL(pcibios_1st_host_bus_nr);
|
|
|
--- /dev/null
|
|
|
+++ b/arch/mips/pci/pcie-lantiq.h
|
|
|
-@@ -0,0 +1,1301 @@
|
|
|
+@@ -0,0 +1,1316 @@
|
|
|
+/******************************************************************************
|
|
|
+**
|
|
|
+** FILE NAME : ifxmips_pcie_reg.h
|
|
|
@@ -5431,6 +5461,21 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+ return tbus_number;
|
|
|
+}
|
|
|
+
|
|
|
++static struct pci_dev *ifx_pci_get_slot(struct pci_bus *bus, unsigned int devfn)
|
|
|
++{
|
|
|
++ struct pci_dev *dev;
|
|
|
++
|
|
|
++ list_for_each_entry(dev, &bus->devices, bus_list) {
|
|
|
++ if (dev->devfn == devfn)
|
|
|
++ goto out;
|
|
|
++ }
|
|
|
++
|
|
|
++ dev = NULL;
|
|
|
++ out:
|
|
|
++ pci_dev_get(dev);
|
|
|
++ return dev;
|
|
|
++}
|
|
|
++
|
|
|
+static inline u32
|
|
|
+ifx_pcie_bus_enum_hack(struct pci_bus *bus, u32 devfn, int where, u32 value, int pcie_port, int read)
|
|
|
+{
|
|
|
@@ -5438,7 +5483,7 @@ Signed-off-by: John Crispin <[email protected]>
|
|
|
+ u32 tvalue = value;
|
|
|
+
|
|
|
+ /* Sanity check */
|
|
|
-+ pdev = pci_get_slot(bus, devfn);
|
|
|
++ pdev = ifx_pci_get_slot(bus, devfn);
|
|
|
+ if (pdev == NULL) {
|
|
|
+ return tvalue;
|
|
|
+ }
|