int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
+#ifdef CONFIG_PCIE_LANTIQ
-+ if (pci_find_capability(dev, PCI_CAP_ID_EXP))
++ if (pci_find_capability((struct pci_dev *)dev, PCI_CAP_ID_EXP))
+ return ifx_pcie_bios_map_irq(dev, slot, pin);
+#endif
+
+
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie.c
-@@ -0,0 +1,1092 @@
+@@ -0,0 +1,1091 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Chuanhua.Lei@infineon.com");
-+MODULE_SUPPORTED_DEVICE("Infineon builtin PCIe RC module");
+MODULE_DESCRIPTION("Infineon builtin PCIe RC driver");
+
--- /dev/null
+
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie_ar10.h
-@@ -0,0 +1,290 @@
+@@ -0,0 +1,305 @@
+/****************************************************************************
+ Copyright (c) 2010
+ Lantiq Deutschland GmbH
+ 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)
+{
+ u32 tvalue = value;
+
+ /* Sanity check */
-+ pdev = pci_get_slot(bus, devfn);
++ pdev = ifx_pci_get_slot(bus, devfn);
+ if (pdev == NULL) {
+ return tvalue;
+ }
+#endif /* IFXMIPS_PCIE_AR10_H */
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie_msi.c
-@@ -0,0 +1,392 @@
+@@ -0,0 +1,391 @@
+/******************************************************************************
+**
+** FILE NAME : ifxmips_pcie_msi.c
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Chuanhua.Lei@infineon.com");
-+MODULE_SUPPORTED_DEVICE("Infineon PCIe IP builtin MSI PIC module");
+MODULE_DESCRIPTION("Infineon PCIe IP builtin MSI PIC driver");
+
--- /dev/null
+
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie_vr9.h
-@@ -0,0 +1,269 @@
+@@ -0,0 +1,284 @@
+/****************************************************************************
+ Copyright (c) 2010
+ Lantiq Deutschland GmbH
+ 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)
+{
+ u32 tvalue = value;
+
+ /* Sanity check */
-+ pdev = pci_get_slot(bus, devfn);
++ pdev = ifx_pci_get_slot(bus, devfn);
+ if (pdev == NULL) {
+ return tvalue;
+ }
+
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
-@@ -313,3 +313,30 @@ char *__init pcibios_setup(char *str)
+@@ -305,3 +305,30 @@ char *__init pcibios_setup(char *str)
return pcibios_plat_setup(str);
return str;
}
+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
+ 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)
+{
+ u32 tvalue = value;
+
+ /* Sanity check */
-+ pdev = pci_get_slot(bus, devfn);
++ pdev = ifx_pci_get_slot(bus, devfn);
+ if (pdev == NULL) {
+ return tvalue;
+ }
(transaction layer end-to-end CRC checking).
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
-@@ -1420,6 +1420,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1482,6 +1482,8 @@ void pci_walk_bus(struct pci_bus *top, i
void *userdata);
int pci_cfg_space_size(struct pci_dev *dev);
unsigned char pci_bus_max_busnr(struct pci_bus *bus);
unsigned long type);
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
-@@ -1079,6 +1079,12 @@
+@@ -1085,6 +1085,12 @@
#define PCI_DEVICE_ID_SGI_IOC3 0x0003
#define PCI_DEVICE_ID_SGI_LITHIUM 0x1002