Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?


> +       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 ;)


> +               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?


> +       return (chip_status & present_mask) == present_mask;

Same :)


> +       u16 offset = BCMA_CC_SPROM;

I guess we can drop second define offset now?


-- 
Rafał
--
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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux