mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[brcm47xx]: bcma: initialize sprom earlier
The chip common and the PCIe code are accessing the sprom struct which is not filled when these cores are initialized. Fix this by adding an early initialize and fill the sprom struct before accessing it in other code. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33600 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
--- a/drivers/bcma/main.c
|
||||
+++ b/drivers/bcma/main.c
|
||||
@@ -165,6 +165,20 @@ int __devinit bcma_bus_register(struct b
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* Early init CC core */
|
||||
+ core = bcma_find_core(bus, bcma_cc_core_id(bus));
|
||||
+ if (core) {
|
||||
+ bus->drv_cc.core = core;
|
||||
+ bcma_core_chipcommon_early_init(&bus->drv_cc);
|
||||
+ }
|
||||
+
|
||||
+ /* Try to get SPROM */
|
||||
+ err = bcma_sprom_get(bus);
|
||||
+ if (err == -ENOENT) {
|
||||
+ bcma_err(bus, "No SPROM available\n");
|
||||
+ } else if (err)
|
||||
+ bcma_err(bus, "Failed to get SPROM: %d\n", err);
|
||||
+
|
||||
/* Init CC core */
|
||||
core = bcma_find_core(bus, bcma_cc_core_id(bus));
|
||||
if (core) {
|
||||
@@ -193,13 +207,6 @@ int __devinit bcma_bus_register(struct b
|
||||
bcma_core_gmac_cmn_init(&bus->drv_gmac_cmn);
|
||||
}
|
||||
|
||||
- /* Try to get SPROM */
|
||||
- err = bcma_sprom_get(bus);
|
||||
- if (err == -ENOENT) {
|
||||
- bcma_err(bus, "No SPROM available\n");
|
||||
- } else if (err)
|
||||
- bcma_err(bus, "Failed to get SPROM: %d\n", err);
|
||||
-
|
||||
/* Register found cores */
|
||||
bcma_register_cores(bus);
|
||||
|
||||
Reference in New Issue
Block a user