diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-03-21 15:25:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-25 16:46:56 -0400 |
commit | 7e4235acfcb640d15a677721f9e7656a123eafa5 (patch) | |
tree | 4eb8976984978d08c1cfc9b4efa1d6414833942e /drivers/ssb | |
parent | 12bef78f0a806639daef58b1770be6ea19b2e94d (diff) |
ssb: read additional sprom v2 and v3 attributes.
These attributes should be in the sprom for rev 2 and 3, but they were
not read out.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb')
-rw-r--r-- | drivers/ssb/pci.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 99bd5adac264..a8dc95ebf2d6 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c | |||
@@ -347,6 +347,21 @@ static s8 r123_extract_antgain(u8 sprom_revision, const u16 *in, | |||
347 | return (s8)gain; | 347 | return (s8)gain; |
348 | } | 348 | } |
349 | 349 | ||
350 | static void sprom_extract_r23(struct ssb_sprom *out, const u16 *in) | ||
351 | { | ||
352 | SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0); | ||
353 | SPEX(opo, SSB_SPROM2_OPO, SSB_SPROM2_OPO_VALUE, 0); | ||
354 | SPEX(pa1lob0, SSB_SPROM2_PA1LOB0, 0xFFFF, 0); | ||
355 | SPEX(pa1lob1, SSB_SPROM2_PA1LOB1, 0xFFFF, 0); | ||
356 | SPEX(pa1lob2, SSB_SPROM2_PA1LOB2, 0xFFFF, 0); | ||
357 | SPEX(pa1hib0, SSB_SPROM2_PA1HIB0, 0xFFFF, 0); | ||
358 | SPEX(pa1hib1, SSB_SPROM2_PA1HIB1, 0xFFFF, 0); | ||
359 | SPEX(pa1hib2, SSB_SPROM2_PA1HIB2, 0xFFFF, 0); | ||
360 | SPEX(maxpwr_ah, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_HI, 0); | ||
361 | SPEX(maxpwr_al, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_LO, | ||
362 | SSB_SPROM2_MAXP_A_LO_SHIFT); | ||
363 | } | ||
364 | |||
350 | static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) | 365 | static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) |
351 | { | 366 | { |
352 | u16 loc[3]; | 367 | u16 loc[3]; |
@@ -396,8 +411,7 @@ static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) | |||
396 | SSB_SPROM1_ITSSI_A_SHIFT); | 411 | SSB_SPROM1_ITSSI_A_SHIFT); |
397 | SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0); | 412 | SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0); |
398 | SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0); | 413 | SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0); |
399 | if (out->revision >= 2) | 414 | |
400 | SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0); | ||
401 | SPEX(alpha2[0], SSB_SPROM1_CCODE, 0xff00, 8); | 415 | SPEX(alpha2[0], SSB_SPROM1_CCODE, 0xff00, 8); |
402 | SPEX(alpha2[1], SSB_SPROM1_CCODE, 0x00ff, 0); | 416 | SPEX(alpha2[1], SSB_SPROM1_CCODE, 0x00ff, 0); |
403 | 417 | ||
@@ -408,6 +422,8 @@ static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) | |||
408 | out->antenna_gain.a1 = r123_extract_antgain(out->revision, in, | 422 | out->antenna_gain.a1 = r123_extract_antgain(out->revision, in, |
409 | SSB_SPROM1_AGAIN_A, | 423 | SSB_SPROM1_AGAIN_A, |
410 | SSB_SPROM1_AGAIN_A_SHIFT); | 424 | SSB_SPROM1_AGAIN_A_SHIFT); |
425 | if (out->revision >= 2) | ||
426 | sprom_extract_r23(out, in); | ||
411 | } | 427 | } |
412 | 428 | ||
413 | /* Revs 4 5 and 8 have partially shared layout */ | 429 | /* Revs 4 5 and 8 have partially shared layout */ |