Thread (24 messages) 24 messages, 6 authors, 2012-03-06

Re: [RFC] bcma: add support for on-chip OTP memory used for SPROM storage

From: Arend van Spriel <hidden>
Date: 2012-02-24 10:15:38

On 02/24/2012 08:52 AM, Rafał Miłecki wrote:
2012/2/23 Arend van Spriel[off-list ref]:
quoted
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.
quoted
+       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.
quoted
+               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.
quoted
+       return (chip_status&  present_mask) == present_mask;
Same :)
Same.
quoted
+       u16 offset = BCMA_CC_SPROM;
I guess we can drop second define offset now?
Yes. Will do that?

Gr. AvS
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help