On 02/24/2012 08:52 AM, Rafał Miłecki wrote:
2012/2/23 Arend van Spriel<arend@xxxxxxxxxxxx>:
Wireless Broadcom chips can have either their SPROM data stored
on either external SPROM or on-chip OTP memory. Both are accessed
through the same register space. This patch adds support for the
on-chip OTP memory.
Tested with:
BCM43224 OTP and SPROM
BCM4331 SPROM
BCM4313 OTP
This patch is in response so gmane article [1].
[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/85426
Great, thanks a lot for your work! I'll give it a try with my cards.
May I ask how did you test this with BCM4331? What card (slot) /
machine did you use for your test?
It is a half mini PCIe card used in my test laptop, ie. Dell Latitude E6410.
+ if (bus->drv_cc.core->id.rev>= 31) {
+ if (!(bus->drv_cc.capabilities& BCMA_CC_CAP_SPROM))
+ return false;
One less indent will be fine ;)
Let's blame my editor :-p. Will fix it.
+ srom_control = bcma_read32(bus->drv_cc.core,
+ BCMA_CC_SROM_CONTROL);
+ return !!(srom_control& BCMA_CC_SROM_CONTROL_PRESENT);
Does any compiler complain on returning sth like 0xF as a bool?
Probably not. Just being overly correct, I guess.
+ return (chip_status& present_mask) == present_mask;
Same :)
Same.
+ u16 offset = BCMA_CC_SPROM;
I guess we can drop second define offset now?
Yes. Will do that?
Gr. AvS
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html