aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-01-30 18:03:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-06 14:53:06 -0500
commitd6865dcc58f252480515101fd13532f0fc420b53 (patch)
tree4e8ee3ef60d44b81d31337925c018f19929ea7f5 /drivers/bcma
parent8f9ada4fa1926e540b1562cb9bacb3e51a698c35 (diff)
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.c7
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)
250{ 250{
251 u16 offset; 251 u16 offset;
252 u16 *sprom; 252 u16 *sprom;
253 u32 sromctrl;
253 int err = 0; 254 int err = 0;
254 255
255 if (!bus->drv_cc.core) 256 if (!bus->drv_cc.core)
@@ -258,6 +259,12 @@ int bcma_sprom_get(struct bcma_bus *bus)
258 if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) 259 if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM))
259 return -ENOENT; 260 return -ENOENT;
260 261
262 if (bus->drv_cc.core->id.rev >= 32) {
263 sromctrl = bcma_read32(bus->drv_cc.core, BCMA_CC_SROM_CONTROL);
264 if (!(sromctrl & BCMA_CC_SROM_CONTROL_PRESENT))
265 return -ENOENT;
266 }
267
261 sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16), 268 sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16),
262 GFP_KERNEL); 269 GFP_KERNEL);
263 if (!sprom) 270 if (!sprom)