1 --- a/arch/mips/pci/pci-bcm47xx.c
2 +++ b/arch/mips/pci/pci-bcm47xx.c
4 #include <linux/types.h>
6 #include <linux/ssb/ssb.h>
7 +#include <linux/bcma/bcma.h>
10 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
11 @@ -32,15 +33,12 @@ int __init pcibios_map_irq(const struct
15 -int pcibios_plat_dev_init(struct pci_dev *dev)
17 #ifdef CONFIG_BCM47XX_SSB
18 +static int bcm47xx_pcibios_plat_dev_init_ssb(struct pci_dev *dev)
23 - if (bcm47xx_bus_type != BCM47XX_BUS_TYPE_SSB)
26 res = ssb_pcibios_plat_dev_init(dev);
28 printk(KERN_ALERT "PCI: Failed to init device %s\n",
29 @@ -60,6 +58,47 @@ int pcibios_plat_dev_init(struct pci_dev
37 +#ifdef CONFIG_BCM47XX_BCMA
38 +static int bcm47xx_pcibios_plat_dev_init_bcma(struct pci_dev *dev)
42 + res = bcma_core_pci_plat_dev_init(dev);
44 + printk(KERN_ALERT "PCI: Failed to init device %s\n",
49 + res = bcma_core_pci_pcibios_map_irq(dev);
51 + /* IRQ-0 and IRQ-1 are software interrupts. */
53 + printk(KERN_ALERT "PCI: Failed to map IRQ of device %s\n",
63 +int pcibios_plat_dev_init(struct pci_dev *dev)
65 +#ifdef CONFIG_BCM47XX_SSB
66 + if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_SSB)
67 + return bcm47xx_pcibios_plat_dev_init_ssb(dev);
70 +#ifdef CONFIG_BCM47XX_BCMA
71 + if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA)
72 + return bcm47xx_pcibios_plat_dev_init_bcma(dev);