diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-01-31 00:03:37 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:53:06 -0500 |
commit | d6865dcc58f252480515101fd13532f0fc420b53 (patch) | |
tree | 4e8ee3ef60d44b81d31337925c018f19929ea7f5 /drivers/bcma | |
parent | 8f9ada4fa1926e540b1562cb9bacb3e51a698c35 (diff) | |
download | talos-obmc-linux-d6865dcc58f252480515101fd13532f0fc420b53.tar.gz talos-obmc-linux-d6865dcc58f252480515101fd13532f0fc420b53.zip |
bcma: add extra sprom check
This check is needed on the BCM43224 device as it says in the
capabilities it has an sprom but is extra check says it has not.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/sprom.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c index e35134f724f6..ca7752510d5b 100644 --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c @@ -250,6 +250,7 @@ int bcma_sprom_get(struct bcma_bus *bus) { u16 offset; u16 *sprom; + u32 sromctrl; int err = 0; if (!bus->drv_cc.core) @@ -258,6 +259,12 @@ int bcma_sprom_get(struct bcma_bus *bus) if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) return -ENOENT; + if (bus->drv_cc.core->id.rev >= 32) { + sromctrl = bcma_read32(bus->drv_cc.core, BCMA_CC_SROM_CONTROL); + if (!(sromctrl & BCMA_CC_SROM_CONTROL_PRESENT)) + return -ENOENT; + } + sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16), GFP_KERNEL); if (!sprom) |