Skip to content

Commit

Permalink
brcmsmac: remove brcmsmac own sprom parsing
Browse files Browse the repository at this point in the history
brcmsmac now takes the sprom from bcma and do not uses its own sprom
parsing any more. Remove this code as it is not used any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed May 16, 2012
1 parent 898d3c3 commit 47671b1
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 1,749 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/brcm80211/brcmsmac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ BRCMSMAC_OFILES := \
phy/phytbl_lcn.o \
phy/phytbl_n.o \
phy/phy_qmath.o \
otp.o \
srom.o \
dma.o \
nicpci.o \
brcms_trace_events.o
Expand Down
45 changes: 0 additions & 45 deletions drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "types.h"
#include "pub.h"
#include "pmu.h"
#include "srom.h"
#include "nicpci.h"
#include "aiutils.h"

Expand Down Expand Up @@ -600,10 +599,6 @@ static struct si_info *ai_doattach(struct si_info *sii,
if (!ai_buscore_setup(sii, cc))
goto exit;

/* Init nvram from sprom/otp if they exist */
if (srom_var_init(&sii->pub))
goto exit;

ai_nvram_process(sii);

/* === NVRAM, clock is ready === */
Expand Down Expand Up @@ -706,7 +701,6 @@ void ai_detach(struct si_pub *sih)
pcicore_deinit(sii->pch);
sii->pch = NULL;

srom_free_vars(sih);
kfree(sii);
}

Expand Down Expand Up @@ -1190,45 +1184,6 @@ bool ai_deviceremoved(struct si_pub *sih)
return false;
}

bool ai_is_sprom_available(struct si_pub *sih)
{
struct si_info *sii = (struct si_info *)sih;

if (ai_get_ccrev(sih) >= 31) {
struct bcma_device *cc;
u32 sromctrl;

if ((ai_get_cccaps(sih) & CC_CAP_SROM) == 0)
return false;

cc = ai_findcore(sih, BCMA_CORE_CHIPCOMMON, 0);
sromctrl = bcma_read32(cc, CHIPCREGOFFS(sromcontrol));
return sromctrl & SRC_PRESENT;
}

switch (ai_get_chip_id(sih)) {
case BCM4313_CHIP_ID:
return (sii->chipst & CST4313_SPROM_PRESENT) != 0;
default:
return true;
}
}

bool ai_is_otp_disabled(struct si_pub *sih)
{
struct si_info *sii = (struct si_info *)sih;

switch (ai_get_chip_id(sih)) {
case BCM4313_CHIP_ID:
return (sii->chipst & CST4313_OTP_PRESENT) == 0;
/* These chips always have their OTP on */
case BCM43224_CHIP_ID:
case BCM43225_CHIP_ID:
default:
return false;
}
}

uint ai_get_buscoretype(struct si_pub *sih)
{
struct si_info *sii = (struct si_info *)sih;
Expand Down
7 changes: 0 additions & 7 deletions drivers/net/wireless/brcm80211/brcmsmac/aiutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ struct si_info {
struct pci_dev *pcibus; /* handle to pci bus */
struct pcicore_info *pch; /* PCI/E core handle */
struct bcma_device *buscore;
struct list_head var_list; /* list of srom variables */

u32 chipst; /* chip status */
};
Expand Down Expand Up @@ -206,12 +205,6 @@ extern bool ai_deviceremoved(struct si_pub *sih);
extern u32 ai_gpiocontrol(struct si_pub *sih, u32 mask, u32 val,
u8 priority);

/* OTP status */
extern bool ai_is_otp_disabled(struct si_pub *sih);

/* SPROM availability */
extern bool ai_is_sprom_available(struct si_pub *sih);

extern void ai_pci_sleep(struct si_pub *sih);
extern void ai_pci_down(struct si_pub *sih);
extern void ai_pci_up(struct si_pub *sih);
Expand Down
Loading

0 comments on commit 47671b1

Please sign in to comment.