diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-03-21 20:25:21 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-25 16:46:56 -0400 |
commit | 7e4235acfcb640d15a677721f9e7656a123eafa5 (patch) | |
tree | 4eb8976984978d08c1cfc9b4efa1d6414833942e /drivers/ssb | |
parent | 12bef78f0a806639daef58b1770be6ea19b2e94d (diff) | |
download | linux-rt-7e4235acfcb640d15a677721f9e7656a123eafa5.tar.gz |
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, return (s8)gain; } +static void sprom_extract_r23(struct ssb_sprom *out, const u16 *in) +{ + SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0); + SPEX(opo, SSB_SPROM2_OPO, SSB_SPROM2_OPO_VALUE, 0); + SPEX(pa1lob0, SSB_SPROM2_PA1LOB0, 0xFFFF, 0); + SPEX(pa1lob1, SSB_SPROM2_PA1LOB1, 0xFFFF, 0); + SPEX(pa1lob2, SSB_SPROM2_PA1LOB2, 0xFFFF, 0); + SPEX(pa1hib0, SSB_SPROM2_PA1HIB0, 0xFFFF, 0); + SPEX(pa1hib1, SSB_SPROM2_PA1HIB1, 0xFFFF, 0); + SPEX(pa1hib2, SSB_SPROM2_PA1HIB2, 0xFFFF, 0); + SPEX(maxpwr_ah, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_HI, 0); + SPEX(maxpwr_al, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_LO, + SSB_SPROM2_MAXP_A_LO_SHIFT); +} + static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) { u16 loc[3]; @@ -396,8 +411,7 @@ static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) SSB_SPROM1_ITSSI_A_SHIFT); SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0); SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0); - if (out->revision >= 2) - SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0); + SPEX(alpha2[0], SSB_SPROM1_CCODE, 0xff00, 8); SPEX(alpha2[1], SSB_SPROM1_CCODE, 0x00ff, 0); @@ -408,6 +422,8 @@ static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) out->antenna_gain.a1 = r123_extract_antgain(out->revision, in, SSB_SPROM1_AGAIN_A, SSB_SPROM1_AGAIN_A_SHIFT); + if (out->revision >= 2) + sprom_extract_r23(out, in); } /* Revs 4 5 and 8 have partially shared layout */ |