* [PATCH 1/2] ssb: use u16 for storing board rev
@ 2011-08-28 16:47 Rafał Miłecki
2011-08-28 16:47 ` [PATCH 2/2] bcma: extract some basic info about board from SPROM Rafał Miłecki
2011-08-28 16:59 ` [PATCH 1/2] ssb: use u16 for storing board rev Larry Finger
0 siblings, 2 replies; 5+ messages in thread
From: Rafał Miłecki @ 2011-08-28 16:47 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
Specs say about size 2 (u16) and my 14e4:4727 has board rev 0x1211.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
include/linux/ssb/ssb.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 8623217..f10ed7b 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -25,7 +25,7 @@ struct ssb_sprom {
u8 et1phyaddr; /* MII address for enet1 */
u8 et0mdcport; /* MDIO for enet0 */
u8 et1mdcport; /* MDIO for enet1 */
- u8 board_rev; /* Board revision number from SPROM. */
+ u16 board_rev; /* Board revision number from SPROM. */
u8 country_code; /* Country Code */
u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */
u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] bcma: extract some basic info about board from SPROM
2011-08-28 16:47 [PATCH 1/2] ssb: use u16 for storing board rev Rafał Miłecki
@ 2011-08-28 16:47 ` Rafał Miłecki
2011-08-28 17:03 ` Larry Finger
2011-08-28 16:59 ` [PATCH 1/2] ssb: use u16 for storing board rev Larry Finger
1 sibling, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2011-08-28 16:47 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@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)
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ssb: use u16 for storing board rev
2011-08-28 16:47 [PATCH 1/2] ssb: use u16 for storing board rev Rafał Miłecki
2011-08-28 16:47 ` [PATCH 2/2] bcma: extract some basic info about board from SPROM Rafał Miłecki
@ 2011-08-28 16:59 ` Larry Finger
1 sibling, 0 replies; 5+ messages in thread
From: Larry Finger @ 2011-08-28 16:59 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 08/28/2011 11:47 AM, Rafał Miłecki wrote:
> Specs say about size 2 (u16) and my 14e4:4727 has board rev 0x1211.
>
> Signed-off-by: Rafał Miłecki<zajec5@gmail.com>
> ---
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
> include/linux/ssb/ssb.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
> index 8623217..f10ed7b 100644
> --- a/include/linux/ssb/ssb.h
> +++ b/include/linux/ssb/ssb.h
> @@ -25,7 +25,7 @@ struct ssb_sprom {
> u8 et1phyaddr; /* MII address for enet1 */
> u8 et0mdcport; /* MDIO for enet0 */
> u8 et1mdcport; /* MDIO for enet1 */
> - u8 board_rev; /* Board revision number from SPROM. */
> + u16 board_rev; /* Board revision number from SPROM. */
> u8 country_code; /* Country Code */
> u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */
> u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] bcma: extract some basic info about board from SPROM
2011-08-28 16:47 ` [PATCH 2/2] bcma: extract some basic info about board from SPROM Rafał Miłecki
@ 2011-08-28 17:03 ` Larry Finger
2011-08-28 17:07 ` Rafał Miłecki
0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2011-08-28 17:03 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 08/28/2011 11:47 AM, Rafał Miłecki wrote:
>
> Signed-off-by: Rafał Miłecki<zajec5@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?
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] bcma: extract some basic info about board from SPROM
2011-08-28 17:03 ` Larry Finger
@ 2011-08-28 17:07 ` Rafał Miłecki
0 siblings, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2011-08-28 17:07 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless, John W. Linville, b43-dev
W dniu 28 sierpnia 2011 19:03 użytkownik Larry Finger
<Larry.Finger@lwfinger.net> napisał:
> On 08/28/2011 11:47 AM, Rafał Miłecki wrote:
>>
>> Signed-off-by: Rafał Miłecki<zajec5@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ł
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-28 17:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-28 16:47 [PATCH 1/2] ssb: use u16 for storing board rev Rafał Miłecki
2011-08-28 16:47 ` [PATCH 2/2] bcma: extract some basic info about board from SPROM Rafał Miłecki
2011-08-28 17:03 ` Larry Finger
2011-08-28 17:07 ` Rafał Miłecki
2011-08-28 16:59 ` [PATCH 1/2] ssb: use u16 for storing board rev Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).