diff options
Diffstat (limited to 'target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch | 717 |
1 files changed, 717 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch b/target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch new file mode 100644 index 0000000000..6056bdf71b --- /dev/null +++ b/target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch @@ -0,0 +1,717 @@ +From e754dfcfe37f49c9249152e2e98e58887a4d87c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> +Date: Thu, 2 Apr 2015 12:30:24 +0200 +Subject: [PATCH] MIPS: BCM47xx: Move filling most of SPROM to the generic + function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This simplifies code a lot by dropping many per-revision-group +functions. There are still some paths left that use uncommon NVRAM read +helpers or fill arrays. They will need to be handled in separated patch. + +I've tested this (by printing SPROM content) for regressions on: +1) BCM4704 (SPROM revision 2) +2) BCM4706 (SPROM revision 8 plus 11 & 9 on extra WiFi cards) +The only difference is not reading board_type from SPROM rev 11 which is +unsupported and treated as rev 1. This change for rev 1 is expected. + +Signed-off-by: Rafał Miłecki <zajec5@gmail.com> +Cc: linux-mips@linux-mips.org +Cc: Hauke Mehrtens <hauke@hauke-m.de> +Cc: Jonas Gorski <jonas.gorski@gmail.com> +Patchwork: https://patchwork.linux-mips.org/patch/9660/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/bcm47xx/sprom.c | 605 ++++++++++++++++------------------------------ + 1 file changed, 204 insertions(+), 401 deletions(-) + +diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c +index 77790c9..68ebf23 100644 +--- a/arch/mips/bcm47xx/sprom.c ++++ b/arch/mips/bcm47xx/sprom.c +@@ -201,9 +201,211 @@ static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, + bool fb = fallback; + + ENTRY(0xfffffffe, u16, pre, "boardrev", board_rev, 0, true); ++ ENTRY(0x00000002, u16, pre, "boardflags", boardflags_lo, 0, fb); ++ ENTRY(0xfffffffc, u16, pre, "boardtype", board_type, 0, true); + ENTRY(0xfffffffe, u16, pre, "boardnum", board_num, 0, fb); +- +- /* TODO: Move more mappings here */ ++ ENTRY(0x00000002, u8, pre, "cc", country_code, 0, fb); ++ ENTRY(0xfffffff8, u8, pre, "regrev", regrev, 0, fb); ++ ++ ENTRY(0xfffffffe, u8, pre, "ledbh0", gpio0, 0xff, fb); ++ ENTRY(0xfffffffe, u8, pre, "ledbh1", gpio1, 0xff, fb); ++ ENTRY(0xfffffffe, u8, pre, "ledbh2", gpio2, 0xff, fb); ++ ENTRY(0xfffffffe, u8, pre, "ledbh3", gpio3, 0xff, fb); ++ ++ ENTRY(0x0000070e, u16, pre, "pa0b0", pa0b0, 0, fb); ++ ENTRY(0x0000070e, u16, pre, "pa0b1", pa0b1, 0, fb); ++ ENTRY(0x0000070e, u16, pre, "pa0b2", pa0b2, 0, fb); ++ ENTRY(0x0000070e, u8, pre, "pa0itssit", itssi_bg, 0, fb); ++ ENTRY(0x0000070e, u8, pre, "pa0maxpwr", maxpwr_bg, 0, fb); ++ ++ ENTRY(0x0000070c, u8, pre, "opo", opo, 0, fb); ++ ENTRY(0xfffffffe, u8, pre, "aa2g", ant_available_bg, 0, fb); ++ ENTRY(0xfffffffe, u8, pre, "aa5g", ant_available_a, 0, fb); ++ ENTRY(0x000007fe, s8, pre, "ag0", antenna_gain.a0, 0, fb); ++ ENTRY(0x000007fe, s8, pre, "ag1", antenna_gain.a1, 0, fb); ++ ENTRY(0x000007f0, s8, pre, "ag2", antenna_gain.a2, 0, fb); ++ ENTRY(0x000007f0, s8, pre, "ag3", antenna_gain.a3, 0, fb); ++ ++ ENTRY(0x0000070e, u16, pre, "pa1b0", pa1b0, 0, fb); ++ ENTRY(0x0000070e, u16, pre, "pa1b1", pa1b1, 0, fb); ++ ENTRY(0x0000070e, u16, pre, "pa1b2", pa1b2, 0, fb); ++ ENTRY(0x0000070c, u16, pre, "pa1lob0", pa1lob0, 0, fb); ++ ENTRY(0x0000070c, u16, pre, "pa1lob1", pa1lob1, 0, fb); ++ ENTRY(0x0000070c, u16, pre, "pa1lob2", pa1lob2, 0, fb); ++ ENTRY(0x0000070c, u16, pre, "pa1hib0", pa1hib0, 0, fb); ++ ENTRY(0x0000070c, u16, pre, "pa1hib1", pa1hib1, 0, fb); ++ ENTRY(0x0000070c, u16, pre, "pa1hib2", pa1hib2, 0, fb); ++ ENTRY(0x0000070e, u8, pre, "pa1itssit", itssi_a, 0, fb); ++ ENTRY(0x0000070e, u8, pre, "pa1maxpwr", maxpwr_a, 0, fb); ++ ENTRY(0x0000070c, u8, pre, "pa1lomaxpwr", maxpwr_al, 0, fb); ++ ENTRY(0x0000070c, u8, pre, "pa1himaxpwr", maxpwr_ah, 0, fb); ++ ++ ENTRY(0x00000708, u8, pre, "bxa2g", bxa2g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "rssisav2g", rssisav2g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "rssismc2g", rssismc2g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "rssismf2g", rssismf2g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "bxa5g", bxa5g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "rssisav5g", rssisav5g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "rssismc5g", rssismc5g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "rssismf5g", rssismf5g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "tri2g", tri2g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "tri5g", tri5g, 0, fb); ++ ENTRY(0x00000708, u8, pre, "tri5gl", tri5gl, 0, fb); ++ ENTRY(0x00000708, u8, pre, "tri5gh", tri5gh, 0, fb); ++ ENTRY(0x00000708, s8, pre, "rxpo2g", rxpo2g, 0, fb); ++ ENTRY(0x00000708, s8, pre, "rxpo5g", rxpo5g, 0, fb); ++ ENTRY(0xfffffff0, u8, pre, "txchain", txchain, 0xf, fb); ++ ENTRY(0xfffffff0, u8, pre, "rxchain", rxchain, 0xf, fb); ++ ENTRY(0xfffffff0, u8, pre, "antswitch", antswitch, 0xff, fb); ++ ENTRY(0x00000700, u8, pre, "tssipos2g", fem.ghz2.tssipos, 0, fb); ++ ENTRY(0x00000700, u8, pre, "extpagain2g", fem.ghz2.extpa_gain, 0, fb); ++ ENTRY(0x00000700, u8, pre, "pdetrange2g", fem.ghz2.pdet_range, 0, fb); ++ ENTRY(0x00000700, u8, pre, "triso2g", fem.ghz2.tr_iso, 0, fb); ++ ENTRY(0x00000700, u8, pre, "antswctl2g", fem.ghz2.antswlut, 0, fb); ++ ENTRY(0x00000700, u8, pre, "tssipos5g", fem.ghz5.tssipos, 0, fb); ++ ENTRY(0x00000700, u8, pre, "extpagain5g", fem.ghz5.extpa_gain, 0, fb); ++ ENTRY(0x00000700, u8, pre, "pdetrange5g", fem.ghz5.pdet_range, 0, fb); ++ ENTRY(0x00000700, u8, pre, "triso5g", fem.ghz5.tr_iso, 0, fb); ++ ENTRY(0x00000700, u8, pre, "antswctl5g", fem.ghz5.antswlut, 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid2ga0", txpid2g[0], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid2ga1", txpid2g[1], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid2ga2", txpid2g[2], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid2ga3", txpid2g[3], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5ga0", txpid5g[0], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5ga1", txpid5g[1], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5ga2", txpid5g[2], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5ga3", txpid5g[3], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gla0", txpid5gl[0], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gla1", txpid5gl[1], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gla2", txpid5gl[2], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gla3", txpid5gl[3], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gha0", txpid5gh[0], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gha1", txpid5gh[1], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gha2", txpid5gh[2], 0, fb); ++ ENTRY(0x000000f0, u8, pre, "txpid5gha3", txpid5gh[3], 0, fb); ++ ++ ENTRY(0xffffff00, u8, pre, "tempthresh", tempthresh, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "tempoffset", tempoffset, 0, fb); ++ ENTRY(0xffffff00, u16, pre, "rawtempsense", rawtempsense, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "measpower", measpower, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "tempsense_slope", tempsense_slope, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "tempcorrx", tempcorrx, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "tempsense_option", tempsense_option, 0, fb); ++ ENTRY(0x00000700, u8, pre, "freqoffset_corr", freqoffset_corr, 0, fb); ++ ENTRY(0x00000700, u8, pre, "iqcal_swp_dis", iqcal_swp_dis, 0, fb); ++ ENTRY(0x00000700, u8, pre, "hw_iqcal_en", hw_iqcal_en, 0, fb); ++ ENTRY(0x00000700, u8, pre, "elna2g", elna2g, 0, fb); ++ ENTRY(0x00000700, u8, pre, "elna5g", elna5g, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "phycal_tempdelta", phycal_tempdelta, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "temps_period", temps_period, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "temps_hysteresis", temps_hysteresis, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "measpower1", measpower1, 0, fb); ++ ENTRY(0xffffff00, u8, pre, "measpower2", measpower2, 0, fb); ++ ++ ENTRY(0x000001f0, u16, pre, "cck2gpo", cck2gpo, 0, fb); ++ ENTRY(0x000001f0, u32, pre, "ofdm2gpo", ofdm2gpo, 0, fb); ++ ENTRY(0x000001f0, u32, pre, "ofdm5gpo", ofdm5gpo, 0, fb); ++ ENTRY(0x000001f0, u32, pre, "ofdm5glpo", ofdm5glpo, 0, fb); ++ ENTRY(0x000001f0, u32, pre, "ofdm5ghpo", ofdm5ghpo, 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo0", mcs2gpo[0], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo1", mcs2gpo[1], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo2", mcs2gpo[2], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo3", mcs2gpo[3], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo4", mcs2gpo[4], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo5", mcs2gpo[5], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo6", mcs2gpo[6], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs2gpo7", mcs2gpo[7], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo0", mcs5gpo[0], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo1", mcs5gpo[1], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo2", mcs5gpo[2], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo3", mcs5gpo[3], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo4", mcs5gpo[4], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo5", mcs5gpo[5], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo6", mcs5gpo[6], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5gpo7", mcs5gpo[7], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo0", mcs5glpo[0], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo1", mcs5glpo[1], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo2", mcs5glpo[2], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo3", mcs5glpo[3], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo4", mcs5glpo[4], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo5", mcs5glpo[5], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo6", mcs5glpo[6], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5glpo7", mcs5glpo[7], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo0", mcs5ghpo[0], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo1", mcs5ghpo[1], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo2", mcs5ghpo[2], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo3", mcs5ghpo[3], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo4", mcs5ghpo[4], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo5", mcs5ghpo[5], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo6", mcs5ghpo[6], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "mcs5ghpo7", mcs5ghpo[7], 0, fb); ++ ENTRY(0x000001f0, u16, pre, "cddpo", cddpo, 0, fb); ++ ENTRY(0x000001f0, u16, pre, "stbcpo", stbcpo, 0, fb); ++ ENTRY(0x000001f0, u16, pre, "bw40po", bw40po, 0, fb); ++ ENTRY(0x000001f0, u16, pre, "bwduppo", bwduppo, 0, fb); ++ ++ ENTRY(0xfffffe00, u16, pre, "cckbw202gpo", cckbw202gpo, 0, fb); ++ ENTRY(0xfffffe00, u16, pre, "cckbw20ul2gpo", cckbw20ul2gpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw202gpo", legofdmbw202gpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw20ul2gpo", legofdmbw20ul2gpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw205glpo", legofdmbw205glpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw20ul5glpo", legofdmbw20ul5glpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw205gmpo", legofdmbw205gmpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw20ul5gmpo", legofdmbw20ul5gmpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw205ghpo", legofdmbw205ghpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "legofdmbw20ul5ghpo", legofdmbw20ul5ghpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw202gpo", mcsbw202gpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "mcsbw20ul2gpo", mcsbw20ul2gpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw402gpo", mcsbw402gpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw205glpo", mcsbw205glpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "mcsbw20ul5glpo", mcsbw20ul5glpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw405glpo", mcsbw405glpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw205gmpo", mcsbw205gmpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "mcsbw20ul5gmpo", mcsbw20ul5gmpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw405gmpo", mcsbw405gmpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw205ghpo", mcsbw205ghpo, 0, fb); ++ ENTRY(0x00000600, u32, pre, "mcsbw20ul5ghpo", mcsbw20ul5ghpo, 0, fb); ++ ENTRY(0xfffffe00, u32, pre, "mcsbw405ghpo", mcsbw405ghpo, 0, fb); ++ ENTRY(0x00000600, u16, pre, "mcs32po", mcs32po, 0, fb); ++ ENTRY(0x00000600, u16, pre, "legofdm40duppo", legofdm40duppo, 0, fb); ++ ENTRY(0x00000700, u8, pre, "pcieingress_war", pcieingress_war, 0, fb); ++ ++ /* TODO: rev 11 support */ ++ ENTRY(0x00000700, u8, pre, "rxgainerr2ga0", rxgainerr2ga[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr2ga1", rxgainerr2ga[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr2ga2", rxgainerr2ga[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gla0", rxgainerr5gla[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gla1", rxgainerr5gla[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gla2", rxgainerr5gla[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gma0", rxgainerr5gma[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gma1", rxgainerr5gma[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gma2", rxgainerr5gma[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gha0", rxgainerr5gha[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gha1", rxgainerr5gha[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gha2", rxgainerr5gha[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gua0", rxgainerr5gua[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gua1", rxgainerr5gua[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "rxgainerr5gua2", rxgainerr5gua[2], 0, fb); ++ ++ ENTRY(0xfffffe00, u8, pre, "sar2g", sar2g, 0, fb); ++ ENTRY(0xfffffe00, u8, pre, "sar5g", sar5g, 0, fb); ++ ++ /* TODO: rev 11 support */ ++ ENTRY(0x00000700, u8, pre, "noiselvl2ga0", noiselvl2ga[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl2ga1", noiselvl2ga[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl2ga2", noiselvl2ga[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gla0", noiselvl5gla[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gla1", noiselvl5gla[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gla2", noiselvl5gla[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gma0", noiselvl5gma[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gma1", noiselvl5gma[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gma2", noiselvl5gma[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gha0", noiselvl5gha[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gha1", noiselvl5gha[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gha2", noiselvl5gha[2], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gua0", noiselvl5gua[0], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gua1", noiselvl5gua[1], 0, fb); ++ ENTRY(0x00000700, u8, pre, "noiselvl5gua2", noiselvl5gua[2], 0, fb); + } + #undef ENTRY /* It's specififc, uses local variable, don't use it (again). */ + +@@ -211,90 +413,12 @@ static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom, + const char *prefix, bool fallback) + { + nvram_read_u16(prefix, NULL, "devid", &sprom->dev_id, 0, fallback); +- nvram_read_u8(prefix, NULL, "ledbh0", &sprom->gpio0, 0xff, fallback); +- nvram_read_u8(prefix, NULL, "ledbh1", &sprom->gpio1, 0xff, fallback); +- nvram_read_u8(prefix, NULL, "ledbh2", &sprom->gpio2, 0xff, fallback); +- nvram_read_u8(prefix, NULL, "ledbh3", &sprom->gpio3, 0xff, fallback); +- nvram_read_u8(prefix, NULL, "aa2g", &sprom->ant_available_bg, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "aa5g", &sprom->ant_available_a, 0, +- fallback); +- nvram_read_s8(prefix, NULL, "ag0", &sprom->antenna_gain.a0, 0, +- fallback); +- nvram_read_s8(prefix, NULL, "ag1", &sprom->antenna_gain.a1, 0, +- fallback); + nvram_read_alpha2(prefix, "ccode", sprom->alpha2, fallback); + } + +-static void bcm47xx_fill_sprom_r12389(struct ssb_sprom *sprom, +- const char *prefix, bool fallback) +-{ +- nvram_read_u16(prefix, NULL, "pa0b0", &sprom->pa0b0, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa0b1", &sprom->pa0b1, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa0b2", &sprom->pa0b2, 0, fallback); +- nvram_read_u8(prefix, NULL, "pa0itssit", &sprom->itssi_bg, 0, fallback); +- nvram_read_u8(prefix, NULL, "pa0maxpwr", &sprom->maxpwr_bg, 0, +- fallback); +- nvram_read_u16(prefix, NULL, "pa1b0", &sprom->pa1b0, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1b1", &sprom->pa1b1, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1b2", &sprom->pa1b2, 0, fallback); +- nvram_read_u8(prefix, NULL, "pa1itssit", &sprom->itssi_a, 0, fallback); +- nvram_read_u8(prefix, NULL, "pa1maxpwr", &sprom->maxpwr_a, 0, fallback); +-} +- +-static void bcm47xx_fill_sprom_r1(struct ssb_sprom *sprom, const char *prefix, +- bool fallback) +-{ +- nvram_read_u16(prefix, NULL, "boardflags", &sprom->boardflags_lo, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "cc", &sprom->country_code, 0, fallback); +-} +- +-static void bcm47xx_fill_sprom_r2389(struct ssb_sprom *sprom, +- const char *prefix, bool fallback) +-{ +- nvram_read_u8(prefix, NULL, "opo", &sprom->opo, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1lob0", &sprom->pa1lob0, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1lob1", &sprom->pa1lob1, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1lob2", &sprom->pa1lob2, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1hib0", &sprom->pa1hib0, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1hib1", &sprom->pa1hib1, 0, fallback); +- nvram_read_u16(prefix, NULL, "pa1hib2", &sprom->pa1hib2, 0, fallback); +- nvram_read_u8(prefix, NULL, "pa1lomaxpwr", &sprom->maxpwr_al, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "pa1himaxpwr", &sprom->maxpwr_ah, 0, +- fallback); +-} +- +-static void bcm47xx_fill_sprom_r389(struct ssb_sprom *sprom, const char *prefix, +- bool fallback) +-{ +- nvram_read_u8(prefix, NULL, "bxa2g", &sprom->bxa2g, 0, fallback); +- nvram_read_u8(prefix, NULL, "rssisav2g", &sprom->rssisav2g, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "rssismc2g", &sprom->rssismc2g, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "rssismf2g", &sprom->rssismf2g, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "bxa5g", &sprom->bxa5g, 0, fallback); +- nvram_read_u8(prefix, NULL, "rssisav5g", &sprom->rssisav5g, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "rssismc5g", &sprom->rssismc5g, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "rssismf5g", &sprom->rssismf5g, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "tri2g", &sprom->tri2g, 0, fallback); +- nvram_read_u8(prefix, NULL, "tri5g", &sprom->tri5g, 0, fallback); +- nvram_read_u8(prefix, NULL, "tri5gl", &sprom->tri5gl, 0, fallback); +- nvram_read_u8(prefix, NULL, "tri5gh", &sprom->tri5gh, 0, fallback); +- nvram_read_s8(prefix, NULL, "rxpo2g", &sprom->rxpo2g, 0, fallback); +- nvram_read_s8(prefix, NULL, "rxpo5g", &sprom->rxpo5g, 0, fallback); +-} +- + static void bcm47xx_fill_sprom_r3(struct ssb_sprom *sprom, const char *prefix, + bool fallback) + { +- nvram_read_u8(prefix, NULL, "regrev", &sprom->regrev, 0, fallback); + nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, + &sprom->leddc_off_time, fallback); + } +@@ -302,309 +426,10 @@ static void bcm47xx_fill_sprom_r3(struct ssb_sprom *sprom, const char *prefix, + static void bcm47xx_fill_sprom_r4589(struct ssb_sprom *sprom, + const char *prefix, bool fallback) + { +- nvram_read_u8(prefix, NULL, "regrev", &sprom->regrev, 0, fallback); +- nvram_read_s8(prefix, NULL, "ag2", &sprom->antenna_gain.a2, 0, +- fallback); +- nvram_read_s8(prefix, NULL, "ag3", &sprom->antenna_gain.a3, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txchain", &sprom->txchain, 0xf, fallback); +- nvram_read_u8(prefix, NULL, "rxchain", &sprom->rxchain, 0xf, fallback); +- nvram_read_u8(prefix, NULL, "antswitch", &sprom->antswitch, 0xff, +- fallback); + nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, + &sprom->leddc_off_time, fallback); + } + +-static void bcm47xx_fill_sprom_r458(struct ssb_sprom *sprom, const char *prefix, +- bool fallback) +-{ +- nvram_read_u16(prefix, NULL, "cck2gpo", &sprom->cck2gpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "ofdm2gpo", &sprom->ofdm2gpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "ofdm5gpo", &sprom->ofdm5gpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "ofdm5glpo", &sprom->ofdm5glpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "ofdm5ghpo", &sprom->ofdm5ghpo, 0, +- fallback); +- nvram_read_u16(prefix, NULL, "cddpo", &sprom->cddpo, 0, fallback); +- nvram_read_u16(prefix, NULL, "stbcpo", &sprom->stbcpo, 0, fallback); +- nvram_read_u16(prefix, NULL, "bw40po", &sprom->bw40po, 0, fallback); +- nvram_read_u16(prefix, NULL, "bwduppo", &sprom->bwduppo, 0, fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo0", &sprom->mcs2gpo[0], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo1", &sprom->mcs2gpo[1], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo2", &sprom->mcs2gpo[2], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo3", &sprom->mcs2gpo[3], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo4", &sprom->mcs2gpo[4], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo5", &sprom->mcs2gpo[5], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo6", &sprom->mcs2gpo[6], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs2gpo7", &sprom->mcs2gpo[7], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo0", &sprom->mcs5gpo[0], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo1", &sprom->mcs5gpo[1], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo2", &sprom->mcs5gpo[2], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo3", &sprom->mcs5gpo[3], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo4", &sprom->mcs5gpo[4], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo5", &sprom->mcs5gpo[5], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo6", &sprom->mcs5gpo[6], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5gpo7", &sprom->mcs5gpo[7], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo0", &sprom->mcs5glpo[0], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo1", &sprom->mcs5glpo[1], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo2", &sprom->mcs5glpo[2], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo3", &sprom->mcs5glpo[3], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo4", &sprom->mcs5glpo[4], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo5", &sprom->mcs5glpo[5], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo6", &sprom->mcs5glpo[6], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5glpo7", &sprom->mcs5glpo[7], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo0", &sprom->mcs5ghpo[0], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo1", &sprom->mcs5ghpo[1], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo2", &sprom->mcs5ghpo[2], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo3", &sprom->mcs5ghpo[3], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo4", &sprom->mcs5ghpo[4], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo5", &sprom->mcs5ghpo[5], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo6", &sprom->mcs5ghpo[6], 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs5ghpo7", &sprom->mcs5ghpo[7], 0, +- fallback); +-} +- +-static void bcm47xx_fill_sprom_r45(struct ssb_sprom *sprom, const char *prefix, +- bool fallback) +-{ +- nvram_read_u8(prefix, NULL, "txpid2ga0", &sprom->txpid2g[0], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid2ga1", &sprom->txpid2g[1], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid2ga2", &sprom->txpid2g[2], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid2ga3", &sprom->txpid2g[3], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5ga0", &sprom->txpid5g[0], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5ga1", &sprom->txpid5g[1], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5ga2", &sprom->txpid5g[2], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5ga3", &sprom->txpid5g[3], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gla0", &sprom->txpid5gl[0], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gla1", &sprom->txpid5gl[1], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gla2", &sprom->txpid5gl[2], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gla3", &sprom->txpid5gl[3], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gha0", &sprom->txpid5gh[0], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gha1", &sprom->txpid5gh[1], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gha2", &sprom->txpid5gh[2], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "txpid5gha3", &sprom->txpid5gh[3], 0, +- fallback); +-} +- +-static void bcm47xx_fill_sprom_r89(struct ssb_sprom *sprom, const char *prefix, +- bool fallback) +-{ +- nvram_read_u8(prefix, NULL, "tssipos2g", &sprom->fem.ghz2.tssipos, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "extpagain2g", +- &sprom->fem.ghz2.extpa_gain, 0, fallback); +- nvram_read_u8(prefix, NULL, "pdetrange2g", +- &sprom->fem.ghz2.pdet_range, 0, fallback); +- nvram_read_u8(prefix, NULL, "triso2g", &sprom->fem.ghz2.tr_iso, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "antswctl2g", &sprom->fem.ghz2.antswlut, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "tssipos5g", &sprom->fem.ghz5.tssipos, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "extpagain5g", +- &sprom->fem.ghz5.extpa_gain, 0, fallback); +- nvram_read_u8(prefix, NULL, "pdetrange5g", +- &sprom->fem.ghz5.pdet_range, 0, fallback); +- nvram_read_u8(prefix, NULL, "triso5g", &sprom->fem.ghz5.tr_iso, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "antswctl5g", &sprom->fem.ghz5.antswlut, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "tempthresh", &sprom->tempthresh, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "tempoffset", &sprom->tempoffset, 0, +- fallback); +- nvram_read_u16(prefix, NULL, "rawtempsense", &sprom->rawtempsense, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "measpower", &sprom->measpower, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "tempsense_slope", +- &sprom->tempsense_slope, 0, fallback); +- nvram_read_u8(prefix, NULL, "tempcorrx", &sprom->tempcorrx, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "tempsense_option", +- &sprom->tempsense_option, 0, fallback); +- nvram_read_u8(prefix, NULL, "freqoffset_corr", +- &sprom->freqoffset_corr, 0, fallback); +- nvram_read_u8(prefix, NULL, "iqcal_swp_dis", &sprom->iqcal_swp_dis, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "hw_iqcal_en", &sprom->hw_iqcal_en, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "elna2g", &sprom->elna2g, 0, fallback); +- nvram_read_u8(prefix, NULL, "elna5g", &sprom->elna5g, 0, fallback); +- nvram_read_u8(prefix, NULL, "phycal_tempdelta", +- &sprom->phycal_tempdelta, 0, fallback); +- nvram_read_u8(prefix, NULL, "temps_period", &sprom->temps_period, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "temps_hysteresis", +- &sprom->temps_hysteresis, 0, fallback); +- nvram_read_u8(prefix, NULL, "measpower1", &sprom->measpower1, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "measpower2", &sprom->measpower2, 0, +- fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr2ga0", +- &sprom->rxgainerr2ga[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr2ga1", +- &sprom->rxgainerr2ga[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr2ga2", +- &sprom->rxgainerr2ga[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gla0", +- &sprom->rxgainerr5gla[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gla1", +- &sprom->rxgainerr5gla[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gla2", +- &sprom->rxgainerr5gla[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gma0", +- &sprom->rxgainerr5gma[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gma1", +- &sprom->rxgainerr5gma[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gma2", +- &sprom->rxgainerr5gma[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gha0", +- &sprom->rxgainerr5gha[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gha1", +- &sprom->rxgainerr5gha[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gha2", +- &sprom->rxgainerr5gha[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gua0", +- &sprom->rxgainerr5gua[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gua1", +- &sprom->rxgainerr5gua[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "rxgainerr5gua2", +- &sprom->rxgainerr5gua[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl2ga0", &sprom->noiselvl2ga[0], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "noiselvl2ga1", &sprom->noiselvl2ga[1], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "noiselvl2ga2", &sprom->noiselvl2ga[2], 0, +- fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gla0", +- &sprom->noiselvl5gla[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gla1", +- &sprom->noiselvl5gla[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gla2", +- &sprom->noiselvl5gla[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gma0", +- &sprom->noiselvl5gma[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gma1", +- &sprom->noiselvl5gma[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gma2", +- &sprom->noiselvl5gma[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gha0", +- &sprom->noiselvl5gha[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gha1", +- &sprom->noiselvl5gha[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gha2", +- &sprom->noiselvl5gha[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gua0", +- &sprom->noiselvl5gua[0], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gua1", +- &sprom->noiselvl5gua[1], 0, fallback); +- nvram_read_u8(prefix, NULL, "noiselvl5gua2", +- &sprom->noiselvl5gua[2], 0, fallback); +- nvram_read_u8(prefix, NULL, "pcieingress_war", +- &sprom->pcieingress_war, 0, fallback); +-} +- +-static void bcm47xx_fill_sprom_r9(struct ssb_sprom *sprom, const char *prefix, +- bool fallback) +-{ +- nvram_read_u16(prefix, NULL, "cckbw202gpo", &sprom->cckbw202gpo, 0, +- fallback); +- nvram_read_u16(prefix, NULL, "cckbw20ul2gpo", &sprom->cckbw20ul2gpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw202gpo", +- &sprom->legofdmbw202gpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw20ul2gpo", +- &sprom->legofdmbw20ul2gpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw205glpo", +- &sprom->legofdmbw205glpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw20ul5glpo", +- &sprom->legofdmbw20ul5glpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw205gmpo", +- &sprom->legofdmbw205gmpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw20ul5gmpo", +- &sprom->legofdmbw20ul5gmpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw205ghpo", +- &sprom->legofdmbw205ghpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "legofdmbw20ul5ghpo", +- &sprom->legofdmbw20ul5ghpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "mcsbw202gpo", &sprom->mcsbw202gpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw20ul2gpo", &sprom->mcsbw20ul2gpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw402gpo", &sprom->mcsbw402gpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw205glpo", &sprom->mcsbw205glpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw20ul5glpo", +- &sprom->mcsbw20ul5glpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "mcsbw405glpo", &sprom->mcsbw405glpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw205gmpo", &sprom->mcsbw205gmpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw20ul5gmpo", +- &sprom->mcsbw20ul5gmpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "mcsbw405gmpo", &sprom->mcsbw405gmpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw205ghpo", &sprom->mcsbw205ghpo, 0, +- fallback); +- nvram_read_u32(prefix, NULL, "mcsbw20ul5ghpo", +- &sprom->mcsbw20ul5ghpo, 0, fallback); +- nvram_read_u32(prefix, NULL, "mcsbw405ghpo", &sprom->mcsbw405ghpo, 0, +- fallback); +- nvram_read_u16(prefix, NULL, "mcs32po", &sprom->mcs32po, 0, fallback); +- nvram_read_u16(prefix, NULL, "legofdm40duppo", +- &sprom->legofdm40duppo, 0, fallback); +- nvram_read_u8(prefix, NULL, "sar2g", &sprom->sar2g, 0, fallback); +- nvram_read_u8(prefix, NULL, "sar5g", &sprom->sar5g, 0, fallback); +-} +- + static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, + const char *prefix, bool fallback) + { +@@ -741,7 +566,6 @@ static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, + static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix, + bool fallback) + { +- nvram_read_u16(prefix, NULL, "boardtype", &sprom->board_type, 0, true); + nvram_read_u32_2(prefix, "boardflags", &sprom->boardflags_lo, + &sprom->boardflags_hi, fallback); + nvram_read_u32_2(prefix, "boardflags2", &sprom->boardflags2_lo, +@@ -759,48 +583,29 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, + switch (sprom->revision) { + case 1: + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r1(sprom, prefix, fallback); + break; + case 2: + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r2389(sprom, prefix, fallback); + break; + case 3: + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r2389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r389(sprom, prefix, fallback); + bcm47xx_fill_sprom_r3(sprom, prefix, fallback); + break; + case 4: + case 5: + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); + bcm47xx_fill_sprom_r4589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r458(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r45(sprom, prefix, fallback); + bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); + bcm47xx_fill_sprom_path_r45(sprom, prefix, fallback); + break; + case 8: + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r2389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r389(sprom, prefix, fallback); + bcm47xx_fill_sprom_r4589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r458(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r89(sprom, prefix, fallback); + bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); + break; + case 9: + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r2389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r389(sprom, prefix, fallback); + bcm47xx_fill_sprom_r4589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r89(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r9(sprom, prefix, fallback); + bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); + break; + default: +@@ -808,8 +613,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, + sprom->revision); + sprom->revision = 1; + bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); +- bcm47xx_fill_sprom_r1(sprom, prefix, fallback); + } + + bcm47xx_sprom_fill_auto(sprom, prefix, fallback); +-- +1.8.4.5 + |