Commit 47671b1a authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

brcmsmac: remove brcmsmac own sprom parsing

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: default avatarHauke Mehrtens <hauke@hauke-m.de>
Tested-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 898d3c3b
...@@ -39,8 +39,6 @@ BRCMSMAC_OFILES := \ ...@@ -39,8 +39,6 @@ BRCMSMAC_OFILES := \
phy/phytbl_lcn.o \ phy/phytbl_lcn.o \
phy/phytbl_n.o \ phy/phytbl_n.o \
phy/phy_qmath.o \ phy/phy_qmath.o \
otp.o \
srom.o \
dma.o \ dma.o \
nicpci.o \ nicpci.o \
brcms_trace_events.o brcms_trace_events.o
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "types.h" #include "types.h"
#include "pub.h" #include "pub.h"
#include "pmu.h" #include "pmu.h"
#include "srom.h"
#include "nicpci.h" #include "nicpci.h"
#include "aiutils.h" #include "aiutils.h"
...@@ -600,10 +599,6 @@ static struct si_info *ai_doattach(struct si_info *sii, ...@@ -600,10 +599,6 @@ static struct si_info *ai_doattach(struct si_info *sii,
if (!ai_buscore_setup(sii, cc)) if (!ai_buscore_setup(sii, cc))
goto exit; goto exit;
/* Init nvram from sprom/otp if they exist */
if (srom_var_init(&sii->pub))
goto exit;
ai_nvram_process(sii); ai_nvram_process(sii);
/* === NVRAM, clock is ready === */ /* === NVRAM, clock is ready === */
...@@ -706,7 +701,6 @@ void ai_detach(struct si_pub *sih) ...@@ -706,7 +701,6 @@ void ai_detach(struct si_pub *sih)
pcicore_deinit(sii->pch); pcicore_deinit(sii->pch);
sii->pch = NULL; sii->pch = NULL;
srom_free_vars(sih);
kfree(sii); kfree(sii);
} }
...@@ -1190,45 +1184,6 @@ bool ai_deviceremoved(struct si_pub *sih) ...@@ -1190,45 +1184,6 @@ bool ai_deviceremoved(struct si_pub *sih)
return false; 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) uint ai_get_buscoretype(struct si_pub *sih)
{ {
struct si_info *sii = (struct si_info *)sih; struct si_info *sii = (struct si_info *)sih;
......
...@@ -174,7 +174,6 @@ struct si_info { ...@@ -174,7 +174,6 @@ struct si_info {
struct pci_dev *pcibus; /* handle to pci bus */ struct pci_dev *pcibus; /* handle to pci bus */
struct pcicore_info *pch; /* PCI/E core handle */ struct pcicore_info *pch; /* PCI/E core handle */
struct bcma_device *buscore; struct bcma_device *buscore;
struct list_head var_list; /* list of srom variables */
u32 chipst; /* chip status */ u32 chipst; /* chip status */
}; };
...@@ -206,12 +205,6 @@ extern bool ai_deviceremoved(struct si_pub *sih); ...@@ -206,12 +205,6 @@ extern bool ai_deviceremoved(struct si_pub *sih);
extern u32 ai_gpiocontrol(struct si_pub *sih, u32 mask, u32 val, extern u32 ai_gpiocontrol(struct si_pub *sih, u32 mask, u32 val,
u8 priority); 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_sleep(struct si_pub *sih);
extern void ai_pci_down(struct si_pub *sih); extern void ai_pci_down(struct si_pub *sih);
extern void ai_pci_up(struct si_pub *sih); extern void ai_pci_up(struct si_pub *sih);
......
This diff is collapsed.
/*
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _BRCM_OTP_H_
#define _BRCM_OTP_H_
#include "types.h"
/* OTP regions */
#define OTP_HW_RGN 1
#define OTP_SW_RGN 2
#define OTP_CI_RGN 4
#define OTP_FUSE_RGN 8
/* From h/w region to end of OTP including checksum */
#define OTP_ALL_RGN 0xf
/* OTP Size */
#define OTP_SZ_MAX (6144/8) /* maximum bytes in one CIS */
extern int otp_read_region(struct si_pub *sih, int region, u16 *data,
uint *wlen);
#endif /* _BRCM_OTP_H_ */
...@@ -214,12 +214,3 @@ wlapi_copyto_objmem(struct phy_shim_info *physhim, uint offset, const void *buf, ...@@ -214,12 +214,3 @@ wlapi_copyto_objmem(struct phy_shim_info *physhim, uint offset, const void *buf,
{ {
brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel); brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel);
} }
char *wlapi_getvar(struct phy_shim_info *physhim, enum brcms_srom_id id)
{
return getvar(physhim->wlc_hw->sih, id);
}
int wlapi_getintvar(struct phy_shim_info *physhim, enum brcms_srom_id id)
{
return getintvar(physhim->wlc_hw->sih, id);
}
...@@ -175,8 +175,5 @@ extern void wlapi_copyto_objmem(struct phy_shim_info *physhim, uint, ...@@ -175,8 +175,5 @@ extern void wlapi_copyto_objmem(struct phy_shim_info *physhim, uint,
extern void wlapi_high_update_phy_mode(struct phy_shim_info *physhim, extern void wlapi_high_update_phy_mode(struct phy_shim_info *physhim,
u32 phy_mode); u32 phy_mode);
extern u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim); extern u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim);
extern char *wlapi_getvar(struct phy_shim_info *physhim, enum brcms_srom_id id);
extern int wlapi_getintvar(struct phy_shim_info *physhim,
enum brcms_srom_id id);
#endif /* _BRCM_PHY_SHIM_H_ */ #endif /* _BRCM_PHY_SHIM_H_ */
...@@ -22,232 +22,6 @@ ...@@ -22,232 +22,6 @@
#include "types.h" #include "types.h"
#include "defs.h" #include "defs.h"
enum brcms_srom_id {
BRCMS_SROM_NULL,
BRCMS_SROM_CONT,
BRCMS_SROM_AA2G,
BRCMS_SROM_AA5G,
BRCMS_SROM_AG0,
BRCMS_SROM_AG1,
BRCMS_SROM_AG2,
BRCMS_SROM_AG3,
BRCMS_SROM_ANTSWCTL2G,
BRCMS_SROM_ANTSWCTL5G,
BRCMS_SROM_ANTSWITCH,
BRCMS_SROM_BOARDFLAGS2,
BRCMS_SROM_BOARDFLAGS,
BRCMS_SROM_BOARDNUM,
BRCMS_SROM_BOARDREV,
BRCMS_SROM_BOARDTYPE,
BRCMS_SROM_BW40PO,
BRCMS_SROM_BWDUPPO,
BRCMS_SROM_BXA2G,
BRCMS_SROM_BXA5G,
BRCMS_SROM_CC,
BRCMS_SROM_CCK2GPO,
BRCMS_SROM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ES 16 /* max # of rates in a rateset */ #define BRCMS_NUMRATES 16 /* max # of rates in a rateset */
/* phy types */ /* phy types */
...@@ -565,8 +339,6 @@ extern void brcms_c_ampdu_flush(struct brcms_c_info *wlc, ...@@ -565,8 +339,6 @@ extern void brcms_c_ampdu_flush(struct brcms_c_info *wlc,
struct ieee80211_sta *sta, u16 tid); struct ieee80211_sta *sta, u16 tid);
extern void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, extern void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
u8 ba_wsize, uint max_rx_ampdu_bytes); u8 ba_wsize, uint max_rx_ampdu_bytes);
extern char *getvar(struct si_pub *sih, enum brcms_srom_id id);
extern int getintvar(struct si_pub *sih, enum brcms_srom_id id);
extern int brcms_c_module_register(struct brcms_pub *pub, extern int brcms_c_module_register(struct brcms_pub *pub,
const char *name, struct brcms_info *hdl, const char *name, struct brcms_info *hdl,
int (*down_fn)(void *handle)); int (*down_fn)(void *handle));
......
This diff is collapsed.
/*
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _BRCM_SROM_H_
#define _BRCM_SROM_H_
#include "types.h"
/* Prototypes */
extern int srom_var_init(struct si_pub *sih);
extern void srom_free_vars(struct si_pub *sih);
extern int srom_read(struct si_pub *sih, uint bus, void *curmap,
uint byteoff, uint nbytes, u16 *buf, bool check_crc);
#endif /* _BRCM_SROM_H_ */
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