aboutsummaryrefslogtreecommitdiff
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
authorGravatar Rafał Miłecki <zajec5@gmail.com> 2011-06-02 02:08:51 +0200
committerGravatar John W. Linville <linville@tuxdriver.com> 2011-06-03 15:01:07 -0400
commit27f18dc2dafe66a93c7101fc94201b8c83903597 (patch)
tree4600db64c653cfc74d427fc26b7f94ef8fb5db28 /drivers/bcma/main.c
parentb43: do not use SSB specific flags when calling core reset function (diff)
downloadlinux-27f18dc2dafe66a93c7101fc94201b8c83903597.tar.gz
linux-27f18dc2dafe66a93c7101fc94201b8c83903597.tar.bz2
linux-27f18dc2dafe66a93c7101fc94201b8c83903597.zip
bcma: read SPROM and extract MAC from it
In case of BCMA cards SPROM is located in the ChipCommon core, it is not mapped as separated host window. So far we have met only SPROMs rev 8. SPROM layout seems to be the same as for SSB buses, so we decided to share SPROM struct and some defines. For now we extract MAC address only, this can be improved of course. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index a2f6b1879273..11e96dc6011a 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -146,6 +146,13 @@ int bcma_bus_register(struct bcma_bus *bus)
bcma_core_pci_init(&bus->drv_pci);
}
+ /* Try to get SPROM */
+ err = bcma_sprom_get(bus);
+ if (err) {
+ pr_err("Failed to get SPROM: %d\n", err);
+ return -ENOENT;
+ }
+
/* Register found cores */
bcma_register_cores(bus);