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_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;
+ }
+
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie_vr9.h
-@@ -0,0 +1,269 @@
+@@ -0,0 +1,284 @@
+/****************************************************************************
+ Copyright (c) 2010
+ Lantiq Deutschland GmbH
+#define IFX_RCU_AHB_BE_PCIE_M 0x00000001 /* Configure AHB master port that connects to PCIe RC in big endian */
+#define IFX_RCU_AHB_BE_PCIE_S 0x00000010 /* Configure AHB slave port that connects to PCIe RC in little endian */
+#define IFX_RCU_AHB_BE_XBAR_M 0x00000002 /* Configure AHB master port that connects to XBAR in big endian */
++#define IFX_RCU_AHB_BE_XBAR_S 0x00000008 /* Configure AHB slave port that connects to XBAR in big endian */
+#define CONFIG_IFX_PCIE_PHY_36MHZ_MODE
+
+#define IFX_PMU1_MODULE_PCIE_PHY (0)
+ 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;
+ }
+}
+
+#endif /* IFXMIPS_PCIE_VR9_H */
-+
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
@@ -305,3 +305,30 @@ char *__init pcibios_setup(char *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
-@@ -1482,6 +1482,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1483,6 +1483,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
-@@ -1085,6 +1085,12 @@
+@@ -1086,6 +1086,12 @@
#define PCI_DEVICE_ID_SGI_IOC3 0x0003
#define PCI_DEVICE_ID_SGI_LITHIUM 0x1002