diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-06-02 02:08:51 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-03 15:01:07 -0400 |
commit | 27f18dc2dafe66a93c7101fc94201b8c83903597 (patch) | |
tree | 4600db64c653cfc74d427fc26b7f94ef8fb5db28 /include | |
parent | 4da909e7b572b561d8150f9d41b04bcfff386222 (diff) | |
download | linux-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 'include')
-rw-r--r-- | include/linux/bcma/bcma.h | 5 | ||||
-rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 27a27a79bea3..6ff080eac0b2 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h @@ -6,6 +6,7 @@ #include <linux/bcma/bcma_driver_chipcommon.h> #include <linux/bcma/bcma_driver_pci.h> +#include <linux/ssb/ssb.h> /* SPROM sharing */ #include "bcma_regs.h" @@ -187,6 +188,10 @@ struct bcma_bus { struct bcma_drv_cc drv_cc; struct bcma_drv_pci drv_pci; + + /* We decided to share SPROM struct with SSB as long as we do not need + * any hacks for BCMA. This simplifies drivers code. */ + struct ssb_sprom sprom; }; extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 083c3b6cd5ce..9c5b69fc985a 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h @@ -244,6 +244,7 @@ #define BCMA_CC_REGCTL_DATA 0x065C #define BCMA_CC_PLLCTL_ADDR 0x0660 #define BCMA_CC_PLLCTL_DATA 0x0664 +#define BCMA_CC_SPROM 0x0830 /* SPROM beginning */ /* Data for the PMU, if available. * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |