Commit 763456a6 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove code for unsupported chipsets from brcmsmac

The brcmsmac driver code contains code fragments for chipsets that are not
supported. These have been removed from the brcmsmac source files.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bd41f648
...@@ -1157,25 +1157,6 @@ static si_info_t *ai_doattach(si_info_t *sii, ...@@ -1157,25 +1157,6 @@ static si_info_t *ai_doattach(si_info_t *sii,
goto exit; goto exit;
} }
/* assume current core is CC */
if ((sii->pub.ccrev == 0x25)
&&
((sih->chip == BCM43236_CHIP_ID
|| sih->chip == BCM43235_CHIP_ID
|| sih->chip == BCM43238_CHIP_ID)
&& (sii->pub.chiprev <= 2))) {
if ((cc->chipstatus & CST43236_BP_CLK) != 0) {
uint clkdiv;
clkdiv = R_REG(&cc->clkdiv);
/* otp_clk_div is even number, 120/14 < 9mhz */
clkdiv = (clkdiv & ~CLKD_OTP) | (14 << CLKD_OTP_SHIFT);
W_REG(&cc->clkdiv, clkdiv);
SI_ERROR(("%s: set clkdiv to %x\n", __func__, clkdiv));
}
udelay(10);
}
/* Init nvram from sprom/otp if they exist */ /* Init nvram from sprom/otp if they exist */
if (srom_var_init if (srom_var_init
(&sii->pub, bustype, regs, vars, varsz)) { (&sii->pub, bustype, regs, vars, varsz)) {
...@@ -1215,8 +1196,7 @@ static si_info_t *ai_doattach(si_info_t *sii, ...@@ -1215,8 +1196,7 @@ static si_info_t *ai_doattach(si_info_t *sii,
pcicore_attach(sii->pch, pvars, SI_DOATTACH); pcicore_attach(sii->pch, pvars, SI_DOATTACH);
} }
if ((sih->chip == BCM43224_CHIP_ID) || if (sih->chip == BCM43224_CHIP_ID) {
(sih->chip == BCM43421_CHIP_ID)) {
/* /*
* enable 12 mA drive strenth for 43224 and * enable 12 mA drive strenth for 43224 and
* set chipControl register bit 15 * set chipControl register bit 15
...@@ -1247,11 +1227,6 @@ static si_info_t *ai_doattach(si_info_t *sii, ...@@ -1247,11 +1227,6 @@ static si_info_t *ai_doattach(si_info_t *sii,
CCTRL_4313_12MA_LED_DRIVE); CCTRL_4313_12MA_LED_DRIVE);
} }
if (sih->chip == BCM4331_CHIP_ID) {
/* Enable Ext PA lines depending on chip package option */
ai_chipcontrl_epa4331(sih, true);
}
return sii; return sii;
exit: exit:
if (sih->bustype == PCI_BUS) { if (sih->bustype == PCI_BUS) {
...@@ -2283,18 +2258,8 @@ bool ai_is_sprom_available(struct si_pub *sih) ...@@ -2283,18 +2258,8 @@ bool ai_is_sprom_available(struct si_pub *sih)
} }
switch (sih->chip) { switch (sih->chip) {
case BCM4329_CHIP_ID:
return (sih->chipst & CST4329_SPROM_SEL) != 0;
case BCM4319_CHIP_ID:
return (sih->chipst & CST4319_SPROM_SEL) != 0;
case BCM4336_CHIP_ID:
return (sih->chipst & CST4336_SPROM_PRESENT) != 0;
case BCM4330_CHIP_ID:
return (sih->chipst & CST4330_SPROM_PRESENT) != 0;
case BCM4313_CHIP_ID: case BCM4313_CHIP_ID:
return (sih->chipst & CST4313_SPROM_PRESENT) != 0; return (sih->chipst & CST4313_SPROM_PRESENT) != 0;
case BCM4331_CHIP_ID:
return (sih->chipst & CST4331_SPROM_PRESENT) != 0;
default: default:
return true; return true;
} }
...@@ -2303,26 +2268,11 @@ bool ai_is_sprom_available(struct si_pub *sih) ...@@ -2303,26 +2268,11 @@ bool ai_is_sprom_available(struct si_pub *sih)
bool ai_is_otp_disabled(struct si_pub *sih) bool ai_is_otp_disabled(struct si_pub *sih)
{ {
switch (sih->chip) { switch (sih->chip) {
case BCM4329_CHIP_ID:
return (sih->chipst & CST4329_SPROM_OTP_SEL_MASK) ==
CST4329_OTP_PWRDN;
case BCM4319_CHIP_ID:
return (sih->chipst & CST4319_SPROM_OTP_SEL_MASK) ==
CST4319_OTP_PWRDN;
case BCM4336_CHIP_ID:
return (sih->chipst & CST4336_OTP_PRESENT) == 0;
case BCM4330_CHIP_ID:
return (sih->chipst & CST4330_OTP_PRESENT) == 0;
case BCM4313_CHIP_ID: case BCM4313_CHIP_ID:
return (sih->chipst & CST4313_OTP_PRESENT) == 0; return (sih->chipst & CST4313_OTP_PRESENT) == 0;
/* These chips always have their OTP on */ /* These chips always have their OTP on */
case BCM43224_CHIP_ID: case BCM43224_CHIP_ID:
case BCM43225_CHIP_ID: case BCM43225_CHIP_ID:
case BCM43421_CHIP_ID:
case BCM43235_CHIP_ID:
case BCM43236_CHIP_ID:
case BCM43238_CHIP_ID:
case BCM4331_CHIP_ID:
default: default:
return false; return false;
} }
......
...@@ -1980,8 +1980,7 @@ bool brcms_b_radio_read_hwdisabled(struct brcms_c_hw_info *wlc_hw) ...@@ -1980,8 +1980,7 @@ bool brcms_b_radio_read_hwdisabled(struct brcms_c_hw_info *wlc_hw)
/* AI chip doesn't restore bar0win2 on hibernation/resume, need sw fixup */ /* AI chip doesn't restore bar0win2 on hibernation/resume, need sw fixup */
if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) || if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) ||
(wlc_hw->sih->chip == BCM43225_CHIP_ID) || (wlc_hw->sih->chip == BCM43225_CHIP_ID))
(wlc_hw->sih->chip == BCM43421_CHIP_ID))
wlc_hw->regs = wlc_hw->regs =
(d11regs_t *) ai_setcore(wlc_hw->sih, D11_CORE_ID, (d11regs_t *) ai_setcore(wlc_hw->sih, D11_CORE_ID,
0); 0);
...@@ -2022,8 +2021,7 @@ void brcms_b_hw_up(struct brcms_c_hw_info *wlc_hw) ...@@ -2022,8 +2021,7 @@ void brcms_b_hw_up(struct brcms_c_hw_info *wlc_hw)
/* AI chip doesn't restore bar0win2 on hibernation/resume, need sw fixup */ /* AI chip doesn't restore bar0win2 on hibernation/resume, need sw fixup */
if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) || if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) ||
(wlc_hw->sih->chip == BCM43225_CHIP_ID) || (wlc_hw->sih->chip == BCM43225_CHIP_ID))
(wlc_hw->sih->chip == BCM43421_CHIP_ID))
wlc_hw->regs = wlc_hw->regs =
(d11regs_t *) ai_setcore(wlc_hw->sih, D11_CORE_ID, (d11regs_t *) ai_setcore(wlc_hw->sih, D11_CORE_ID,
0); 0);
......
...@@ -1586,15 +1586,7 @@ void *brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit, ...@@ -1586,15 +1586,7 @@ void *brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
/* initialize radio_mpc_disable according to wlc->mpc */ /* initialize radio_mpc_disable according to wlc->mpc */
brcms_c_radio_mpc_upd(wlc); brcms_c_radio_mpc_upd(wlc);
if ((wlc->pub->sih->chip) == BCM43235_CHIP_ID) {
if ((getintvar(wlc->pub->vars, "aa2g") == 7) ||
(getintvar(wlc->pub->vars, "aa5g") == 7)) {
brcms_b_antsel_set(wlc->hw, 1);
}
} else {
brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail); brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail);
}
if (perr) if (perr)
*perr = 0; *perr = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment