[PATCH 2/2] bcma: extract some basic info about board from SPROM

Rafał Miłecki zajec5 at gmail.com
Sun Aug 28 13:07:26 EDT 2011


W dniu 28 sierpnia 2011 19:03 użytkownik Larry Finger
<Larry.Finger at lwfinger.net> napisał:
> On 08/28/2011 11:47 AM, Rafał Miłecki wrote:
>>
>> Signed-off-by: Rafał Miłecki<zajec5 at gmail.com>
>> ---
>>  drivers/bcma/sprom.c |    9 +++++++++
>>  1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
>> index 166ed13..d729239 100644
>> --- a/drivers/bcma/sprom.c
>> +++ b/drivers/bcma/sprom.c
>> @@ -133,6 +133,15 @@ static void bcma_sprom_extract_r8(struct bcma_bus
>> *bus, const u16 *sprom)
>>                v = sprom[SPOFF(SSB_SPROM8_IL0MAC) + i];
>>                *(((__be16 *)bus->sprom.il0mac) + i) = cpu_to_be16(v);
>>        }
>> +
>> +       bus->sprom.board_rev = sprom[SPOFF(SSB_SPROM8_BOARDREV)];
>> +
>> +       bus->sprom.boardflags_lo = sprom[SPOFF(SSB_SPROM8_BFLLO)];
>> +       bus->sprom.boardflags_hi = sprom[SPOFF(SSB_SPROM8_BFLHI)];
>> +       bus->sprom.boardflags2_lo = sprom[SPOFF(SSB_SPROM8_BFL2LO)];
>> +       bus->sprom.boardflags2_hi = sprom[SPOFF(SSB_SPROM8_BFL2HI)];
>> +
>> +       bus->sprom.country_code = sprom[SPOFF(SSB_SPROM8_CCODE)];
>>  }
>>
>>  int bcma_sprom_get(struct bcma_bus *bus)
>
> Does the card in question not need any other info from the SPROM, or is this
> just a first step? Is the usual SPROM Rev 8 code part of ssb, and is that
> the reason you don't use it here?

It will need more info, I just didn't add everything yet. I think we
should review ssb's code anyway, so I didn't copy&paste it. For
example ssb doesn't read board_rev at the moment for SPROM rev 8.

-- 
Rafał



More information about the b43-dev mailing list