aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/pci/pci-bcm63xx.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/mips/pci/pci-bcm63xx.c b/arch/mips/pci/pci-bcm63xx.c
index 39eb7c417e2f..a2b6d55a2492 100644
--- a/arch/mips/pci/pci-bcm63xx.c
+++ b/arch/mips/pci/pci-bcm63xx.c
@@ -94,17 +94,10 @@ static void bcm63xx_int_cfg_writel(u32 val, u32 reg)
94 94
95void __iomem *pci_iospace_start; 95void __iomem *pci_iospace_start;
96 96
97static int __init bcm63xx_pci_init(void) 97static int __init bcm63xx_register_pci(void)
98{ 98{
99 unsigned int mem_size; 99 unsigned int mem_size;
100 u32 val; 100 u32 val;
101
102 if (!BCMCPU_IS_6348() && !BCMCPU_IS_6358() && !BCMCPU_IS_6368())
103 return -ENODEV;
104
105 if (!bcm63xx_pci_enabled)
106 return -ENODEV;
107
108 /* 101 /*
109 * configuration access are done through IO space, remap 4 102 * configuration access are done through IO space, remap 4
110 * first bytes to access it from CPU. 103 * first bytes to access it from CPU.
@@ -221,4 +214,20 @@ static int __init bcm63xx_pci_init(void)
221 return 0; 214 return 0;
222} 215}
223 216
217
218static int __init bcm63xx_pci_init(void)
219{
220 if (!bcm63xx_pci_enabled)
221 return -ENODEV;
222
223 switch (bcm63xx_get_cpu_id()) {
224 case BCM6348_CPU_ID:
225 case BCM6358_CPU_ID:
226 case BCM6368_CPU_ID:
227 return bcm63xx_register_pci();
228 default:
229 return -ENODEV;
230 }
231}
232
224arch_initcall(bcm63xx_pci_init); 233arch_initcall(bcm63xx_pci_init);