diff options
Diffstat (limited to 'arch/mips/bcm47xx/setup.c')
-rw-r--r-- | arch/mips/bcm47xx/setup.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c index 444c65a09970..e43b5046cb30 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c | |||
@@ -156,15 +156,14 @@ static void __init bcm47xx_register_bcma(void) | |||
156 | err = bcma_host_soc_register(&bcm47xx_bus.bcma); | 156 | err = bcma_host_soc_register(&bcm47xx_bus.bcma); |
157 | if (err) | 157 | if (err) |
158 | panic("Failed to register BCMA bus (err %d)", err); | 158 | panic("Failed to register BCMA bus (err %d)", err); |
159 | |||
160 | err = bcma_host_soc_init(&bcm47xx_bus.bcma); | ||
161 | if (err) | ||
162 | panic("Failed to initialize BCMA bus (err %d)", err); | ||
163 | |||
164 | bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL); | ||
165 | } | 159 | } |
166 | #endif | 160 | #endif |
167 | 161 | ||
162 | /* | ||
163 | * Memory setup is done in the early part of MIPS's arch_mem_init. It's supposed | ||
164 | * to detect memory and record it with add_memory_region. | ||
165 | * Any extra initializaion performed here must not use kmalloc or bootmem. | ||
166 | */ | ||
168 | void __init plat_mem_setup(void) | 167 | void __init plat_mem_setup(void) |
169 | { | 168 | { |
170 | struct cpuinfo_mips *c = ¤t_cpu_data; | 169 | struct cpuinfo_mips *c = ¤t_cpu_data; |
@@ -193,6 +192,28 @@ void __init plat_mem_setup(void) | |||
193 | _machine_restart = bcm47xx_machine_restart; | 192 | _machine_restart = bcm47xx_machine_restart; |
194 | _machine_halt = bcm47xx_machine_halt; | 193 | _machine_halt = bcm47xx_machine_halt; |
195 | pm_power_off = bcm47xx_machine_halt; | 194 | pm_power_off = bcm47xx_machine_halt; |
195 | } | ||
196 | |||
197 | /* | ||
198 | * This finishes bus initialization doing things that were not possible without | ||
199 | * kmalloc. Make sure to call it late enough (after mm_init). | ||
200 | */ | ||
201 | void __init bcm47xx_bus_setup(void) | ||
202 | { | ||
203 | #ifdef CONFIG_BCM47XX_BCMA | ||
204 | if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) { | ||
205 | int err; | ||
206 | |||
207 | err = bcma_host_soc_init(&bcm47xx_bus.bcma); | ||
208 | if (err) | ||
209 | panic("Failed to initialize BCMA bus (err %d)", err); | ||
210 | |||
211 | bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, | ||
212 | NULL); | ||
213 | } | ||
214 | #endif | ||
215 | |||
216 | /* With bus initialized we can access NVRAM and detect the board */ | ||
196 | bcm47xx_board_detect(); | 217 | bcm47xx_board_detect(); |
197 | mips_set_machine_name(bcm47xx_board_get_name()); | 218 | mips_set_machine_name(bcm47xx_board_get_name()); |
198 | } | 219 | } |