mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
8f9ada4fa1
commit
d6865dcc58
2 changed files with 23 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue