aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/sprom.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-12-08 12:02:22 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 15:30:52 -0500
commitaee5ed563d56c713d2a51d6f16e08b83fd9665d5 (patch)
treef647a9745a4640f9e11eebe414d9e109fb9d79b2 /drivers/bcma/sprom.c
parent8a5ac6ecd56756ee72588627aa23ab6cf9b790db (diff)
bcma: extract FEM info from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/sprom.c')
-rw-r--r--drivers/bcma/sprom.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
index d7292390d236..b6c474bbd572 100644
--- a/drivers/bcma/sprom.c
+++ b/drivers/bcma/sprom.c
@@ -142,6 +142,28 @@ static void bcma_sprom_extract_r8(struct bcma_bus *bus, const u16 *sprom)
142 bus->sprom.boardflags2_hi = sprom[SPOFF(SSB_SPROM8_BFL2HI)]; 142 bus->sprom.boardflags2_hi = sprom[SPOFF(SSB_SPROM8_BFL2HI)];
143 143
144 bus->sprom.country_code = sprom[SPOFF(SSB_SPROM8_CCODE)]; 144 bus->sprom.country_code = sprom[SPOFF(SSB_SPROM8_CCODE)];
145
146 bus->sprom.fem.ghz2.tssipos = (sprom[SPOFF(SSB_SPROM8_FEM2G)] &
147 SSB_SROM8_FEM_TSSIPOS) >> SSB_SROM8_FEM_TSSIPOS_SHIFT;
148 bus->sprom.fem.ghz2.extpa_gain = (sprom[SPOFF(SSB_SPROM8_FEM2G)] &
149 SSB_SROM8_FEM_EXTPA_GAIN) >> SSB_SROM8_FEM_EXTPA_GAIN_SHIFT;
150 bus->sprom.fem.ghz2.pdet_range = (sprom[SPOFF(SSB_SPROM8_FEM2G)] &
151 SSB_SROM8_FEM_PDET_RANGE) >> SSB_SROM8_FEM_PDET_RANGE_SHIFT;
152 bus->sprom.fem.ghz2.tr_iso = (sprom[SPOFF(SSB_SPROM8_FEM2G)] &
153 SSB_SROM8_FEM_TR_ISO) >> SSB_SROM8_FEM_TR_ISO_SHIFT;
154 bus->sprom.fem.ghz2.antswlut = (sprom[SPOFF(SSB_SPROM8_FEM2G)] &
155 SSB_SROM8_FEM_ANTSWLUT) >> SSB_SROM8_FEM_ANTSWLUT_SHIFT;
156
157 bus->sprom.fem.ghz5.tssipos = (sprom[SPOFF(SSB_SPROM8_FEM5G)] &
158 SSB_SROM8_FEM_TSSIPOS) >> SSB_SROM8_FEM_TSSIPOS_SHIFT;
159 bus->sprom.fem.ghz5.extpa_gain = (sprom[SPOFF(SSB_SPROM8_FEM5G)] &
160 SSB_SROM8_FEM_EXTPA_GAIN) >> SSB_SROM8_FEM_EXTPA_GAIN_SHIFT;
161 bus->sprom.fem.ghz5.pdet_range = (sprom[SPOFF(SSB_SPROM8_FEM5G)] &
162 SSB_SROM8_FEM_PDET_RANGE) >> SSB_SROM8_FEM_PDET_RANGE_SHIFT;
163 bus->sprom.fem.ghz5.tr_iso = (sprom[SPOFF(SSB_SPROM8_FEM5G)] &
164 SSB_SROM8_FEM_TR_ISO) >> SSB_SROM8_FEM_TR_ISO_SHIFT;
165 bus->sprom.fem.ghz5.antswlut = (sprom[SPOFF(SSB_SPROM8_FEM5G)] &
166 SSB_SROM8_FEM_ANTSWLUT) >> SSB_SROM8_FEM_ANTSWLUT_SHIFT;
145} 167}
146 168
147int bcma_sprom_get(struct bcma_bus *bus) 169int bcma_sprom_get(struct bcma_bus *bus)