aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_mips.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-09-29 14:29:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-19 15:52:18 -0400
commit49655bb8a51565f0375a4f783334c9de78134be5 (patch)
tree2e1b63c9fa53e5e53190ff2d9d652dd057158846 /drivers/bcma/driver_mips.c
parentb0a949b42ba7d6f1b2876045a5e062fdfe8c691f (diff)
bcma: just do the necessary things in early register on SoCs
Some parts of the initialization for chip common and the pcie core are accessing the sprom struct, but it is not initialized at that stage. Just do the necessary thing in the early register on SoCs and not the complete initialization to read out the nvram from the flash chip. After it is possible to read out the nvram, the sprom should be parsed from it and the full initialization of the cores should be run. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_mips.c')
-rw-r--r--drivers/bcma/driver_mips.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index cc65b45b4368..f44f1fb67011 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -212,16 +212,33 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
212 } 212 }
213} 213}
214 214
215void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
216{
217 struct bcma_bus *bus = mcore->core->bus;
218
219 if (mcore->early_setup_done)
220 return;
221
222 bcma_chipco_serial_init(&bus->drv_cc);
223 bcma_core_mips_flash_detect(mcore);
224
225 mcore->early_setup_done = true;
226}
227
215void bcma_core_mips_init(struct bcma_drv_mips *mcore) 228void bcma_core_mips_init(struct bcma_drv_mips *mcore)
216{ 229{
217 struct bcma_bus *bus; 230 struct bcma_bus *bus;
218 struct bcma_device *core; 231 struct bcma_device *core;
219 bus = mcore->core->bus; 232 bus = mcore->core->bus;
220 233
234 if (mcore->setup_done)
235 return;
236
221 bcma_info(bus, "Initializing MIPS core...\n"); 237 bcma_info(bus, "Initializing MIPS core...\n");
222 238
223 if (!mcore->setup_done) 239 bcma_core_mips_early_init(mcore);
224 mcore->assigned_irqs = 1; 240
241 mcore->assigned_irqs = 1;
225 242
226 /* Assign IRQs to all cores on the bus */ 243 /* Assign IRQs to all cores on the bus */
227 list_for_each_entry(core, &bus->cores, list) { 244 list_for_each_entry(core, &bus->cores, list) {
@@ -256,10 +273,5 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore)
256 bcma_info(bus, "IRQ reconfiguration done\n"); 273 bcma_info(bus, "IRQ reconfiguration done\n");
257 bcma_core_mips_dump_irq(bus); 274 bcma_core_mips_dump_irq(bus);
258 275
259 if (mcore->setup_done)
260 return;
261
262 bcma_chipco_serial_init(&bus->drv_cc);
263 bcma_core_mips_flash_detect(mcore);
264 mcore->setup_done = true; 276 mcore->setup_done = true;
265} 277}