It's not doing anything and is a bit silly.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reclaiming text and data :
* The following macros specify special linker sections that can be reclaimed
* after a system is considered 'up'.
- * BCMATTACHFN is also used for detach functions (it's not worth having a BCMDETACHFN,
- * as in most cases, the attach function calls the detach function to clean up on error).
*/
-
-#define bcmreclaimed 0
-#define BCMATTACHDATA(_data) _data
-#define BCMATTACHFN(_fn) _fn
#define BCMINITDATA(_data) _data
#define BCMINITFN(_fn) _fn
#define BCMUNINITFN(_fn) _fn
}
}
-shared_phy_t *BCMATTACHFN(wlc_phy_shared_attach) (shared_phy_params_t *shp)
+shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp)
{
shared_phy_t *sh;
return sh;
}
-void BCMATTACHFN(wlc_phy_shared_detach) (shared_phy_t *phy_sh)
+void wlc_phy_shared_detach(shared_phy_t *phy_sh)
{
osl_t *osh;
}
}
-wlc_phy_t *BCMATTACHFN(wlc_phy_attach) (shared_phy_t *sh, void *regs,
- int bandtype, char *vars) {
+wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, char *vars)
+{
phy_info_t *pi;
u32 sflags = 0;
uint phyversion;
return NULL;
}
-void BCMATTACHFN(wlc_phy_detach) (wlc_phy_t *pih)
+void wlc_phy_detach(wlc_phy_t *pih)
{
phy_info_t *pi = (phy_info_t *) pih;
return;
}
-static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
+static bool wlc_phy_txpwr_srom_read_lcnphy(phy_info_t *pi)
{
s8 txpwr = 0;
int i;
return TRUE;
}
-static void BCMATTACHFN(wlc_phy_txpwrctrl_config_nphy) (phy_info_t *pi)
+static void wlc_phy_txpwrctrl_config_nphy(phy_info_t *pi)
{
if (NREV_GE(pi->pubpi.phy_rev, 3)) {
return;
}
-static void BCMATTACHFN(wlc_phy_txpwr_srom_read_ppr_nphy) (phy_info_t *pi)
+static void wlc_phy_txpwr_srom_read_ppr_nphy(phy_info_t *pi)
{
u16 bw40po, cddpo, stbcpo, bwduppo;
uint band_num;
wlc_phy_txpwr_apply_nphy(pi);
}
-static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_nphy) (phy_info_t *pi)
+static bool wlc_phy_txpwr_srom_read_nphy(phy_info_t *pi)
{
pi->antswitch = (u8) PHY_GETINTVAR(pi, "antswitch");
return item;
}
-void BCMATTACHFN(wlc_tunables_init) (wlc_tunables_t *tunables, uint devid)
+void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
{
tunables->ntxd = NTXD;
tunables->nrxd = NRXD;
#endif /* WLC_HIGH_ONLY */
}
-static wlc_pub_t *BCMATTACHFN(wlc_pub_malloc) (osl_t *osh, uint unit,
- uint *err, uint devid) {
+static wlc_pub_t *wlc_pub_malloc(osl_t *osh, uint unit, uint *err, uint devid)
+{
wlc_pub_t *pub;
pub = (wlc_pub_t *) wlc_calloc(osh, unit, sizeof(wlc_pub_t));
return NULL;
}
-static void BCMATTACHFN(wlc_pub_mfree) (osl_t *osh, wlc_pub_t *pub)
+static void wlc_pub_mfree(osl_t *osh, wlc_pub_t *pub)
{
if (pub == NULL)
return;
/*
* The common driver entry routine. Error codes should be unique
*/
-wlc_info_t *BCMATTACHFN(wlc_attach_malloc) (osl_t *osh, uint unit, uint *err,
- uint devid) {
+wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid)
+{
wlc_info_t *wlc;
wlc = (wlc_info_t *) wlc_calloc(osh, unit, sizeof(wlc_info_t));
return NULL;
}
-void BCMATTACHFN(wlc_detach_mfree) (wlc_info_t *wlc, osl_t *osh)
+void wlc_detach_mfree(wlc_info_t *wlc, osl_t *osh)
{
if (wlc == NULL)
return;
return ltoh16(h->seq) >> SEQNUM_SHIFT;
}
-ampdu_info_t *BCMATTACHFN(wlc_ampdu_attach) (wlc_info_t *wlc)
+ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc)
{
ampdu_info_t *ampdu;
int i;
return ampdu;
}
-void BCMATTACHFN(wlc_ampdu_detach) (ampdu_info_t *ampdu)
+void wlc_ampdu_detach(ampdu_info_t *ampdu)
{
int i;
return asi;
}
-void BCMATTACHFN(wlc_antsel_detach) (antsel_info_t *asi)
+void wlc_antsel_detach(antsel_info_t *asi)
{
if (!asi)
return;
return 0;
}
-static bool
-BCMATTACHFN(wlc_bmac_attach_dmapio) (wlc_info_t *wlc, uint j, bool wme)
+static bool wlc_bmac_attach_dmapio(wlc_info_t *wlc, uint j, bool wme)
{
uint i;
char name[8];
return TRUE;
}
-static void BCMATTACHFN(wlc_bmac_detach_dmapio) (wlc_hw_info_t *wlc_hw)
+static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw)
{
uint j;
* initialize software state for each core and band
* put the whole chip in reset(driver down state), no clock
*/
-
-int
-BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, u16 vendor, u16 device,
- uint unit, bool piomode, osl_t *osh,
- void *regsva, uint bustype, void *btparam) {
+int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit,
+ bool piomode, osl_t *osh, void *regsva, uint bustype,
+ void *btparam)
+{
wlc_hw_info_t *wlc_hw;
d11regs_t *regs;
char *macaddr = NULL;
* may get overrides later in this function
* BMAC_NOTES, move low out and resolve the dangling ones
*/
-void BCMATTACHFN(wlc_bmac_info_init) (wlc_hw_info_t *wlc_hw)
+void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw)
{
wlc_info_t *wlc = wlc_hw->wlc;
/*
* low level detach
*/
-int BCMATTACHFN(wlc_bmac_detach) (wlc_info_t *wlc)
+int wlc_bmac_detach(wlc_info_t *wlc)
{
uint i;
wlc_hwband_t *band;
}
}
-static bool BCMATTACHFN(wlc_isgoodchip) (wlc_hw_info_t *wlc_hw)
+static bool wlc_isgoodchip(wlc_hw_info_t *wlc_hw)
{
/* reject unsupported corerev */
return TRUE;
}
-static bool BCMATTACHFN(wlc_validboardtype) (wlc_hw_info_t *wlc_hw)
+static bool wlc_validboardtype(wlc_hw_info_t *wlc_hw)
{
bool goodboard = TRUE;
uint boardrev = wlc_hw->boardrev;
si_gpiocontrol(wlc_hw->sih, gm, gc, GPIO_DRV_PRIORITY);
}
-static void BCMATTACHFN(wlc_ucode_download) (wlc_hw_info_t *wlc_hw)
+static void wlc_ucode_download(wlc_hw_info_t *wlc_hw)
{
wlc_info_t *wlc;
wlc = wlc_hw->wlc;
}
}
-static void
-BCMATTACHFN(wlc_ucode_write) (wlc_hw_info_t *wlc_hw, const u32 ucode[],
+static void wlc_ucode_write(wlc_hw_info_t *wlc_hw, const u32 ucode[],
const uint nbytes) {
osl_t *osh;
d11regs_t *regs = wlc_hw->regs;
return;
}
-bool BCMATTACHFN(wlc_bmac_validate_chip_access) (wlc_hw_info_t *wlc_hw)
+bool wlc_bmac_validate_chip_access(wlc_hw_info_t *wlc_hw)
{
d11regs_t *regs;
u32 w, val;
return g_mimo_5g_table[locale_idx];
}
-wlc_cm_info_t *BCMATTACHFN(wlc_channel_mgr_attach) (wlc_info_t *wlc)
+wlc_cm_info_t *wlc_channel_mgr_attach(wlc_info_t *wlc)
{
wlc_cm_info_t *wlc_cm;
char country_abbrev[WLC_CNTRY_BUF_SZ];
return wlc_cm;
}
-void BCMATTACHFN(wlc_channel_mgr_detach) (wlc_cm_info_t *wlc_cm)
+void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm)
{
if (wlc_cm)
MFREE(wlc_cm->pub->osh, wlc_cm, sizeof(wlc_cm_info_t));
/*
* Export functions
*/
-wlc_eventq_t *BCMATTACHFN(wlc_eventq_attach) (wlc_pub_t *pub,
- struct wlc_info *wlc, void *wl,
- wlc_eventq_cb_t cb) {
+wlc_eventq_t *wlc_eventq_attach(wlc_pub_t *pub, struct wlc_info *wlc, void *wl,
+ wlc_eventq_cb_t cb)
+{
wlc_eventq_t *eq;
eq = (wlc_eventq_t *) MALLOC(pub->osh, sizeof(wlc_eventq_t));
return eq;
}
-int BCMATTACHFN(wlc_eventq_detach) (wlc_eventq_t *eq)
+int wlc_eventq_detach(wlc_eventq_t *eq)
{
/* Clean up pending events */
wlc_eventq_down(eq);
}
-bool BCMATTACHFN(wlc_timers_init) (wlc_info_t *wlc, int unit)
+bool wlc_timers_init(wlc_info_t *wlc, int unit)
{
wlc->wdtimer = wl_init_timer(wlc->wl, wlc_watchdog_by_timer,
wlc, "watchdog");
* Initialize wlc_info default values ...
* may get overrides later in this function
*/
-void BCMATTACHFN(wlc_info_init) (wlc_info_t *wlc, int unit)
+void wlc_info_init(wlc_info_t *wlc, int unit)
{
int i;
/* Assume the device is there until proven otherwise */
return TRUE;
}
-static uint BCMATTACHFN(wlc_attach_module) (wlc_info_t *wlc)
+static uint wlc_attach_module(wlc_info_t *wlc)
{
uint err = 0;
uint unit;
/*
* The common driver entry routine. Error codes should be unique
*/
-void *BCMATTACHFN(wlc_attach) (void *wl, u16 vendor, u16 device,
- uint unit, bool piomode, osl_t *osh,
- void *regsva, uint bustype, void *btparam,
- uint *perr) {
+void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
+ osl_t *osh, void *regsva, uint bustype, void *btparam,
+ uint *perr)
+{
wlc_info_t *wlc;
uint err = 0;
uint j;
}
}
-static bool BCMATTACHFN(wlc_attach_stf_ant_init) (wlc_info_t *wlc)
+static bool wlc_attach_stf_ant_init(wlc_info_t *wlc)
{
int aa;
uint unit;
#ifdef WLC_HIGH_ONLY
/* HIGH_ONLY bmac_attach, which sync over LOW_ONLY bmac_attach states */
-int
-BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, u16 vendor, u16 device,
- uint unit, bool piomode, osl_t *osh,
- void *regsva, uint bustype, void *btparam) {
+int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit,
+ bool piomode, osl_t *osh, void *regsva, uint bustype,
+ void *btparam)
+{
wlc_bmac_revinfo_t revinfo;
uint idx = 0;
rpc_info_t *rpc = (rpc_info_t *) btparam;
#endif /* WLC_HIGH_ONLY */
-static void BCMATTACHFN(wlc_timers_deinit) (wlc_info_t *wlc)
+static void wlc_timers_deinit(wlc_info_t *wlc)
{
/* free timer state */
if (wlc->wdtimer) {
}
}
-static void BCMATTACHFN(wlc_detach_module) (wlc_info_t *wlc)
+static void wlc_detach_module(wlc_info_t *wlc)
{
if (wlc->asi) {
wlc_antsel_detach(wlc->asi);
* One exception is sb register access, which is possible if crystal is turned on
* After "down" state, driver should avoid software timer with the exception of radio_monitor.
*/
-uint BCMATTACHFN(wlc_detach) (wlc_info_t *wlc)
+uint wlc_detach(wlc_info_t *wlc)
{
uint i;
uint callbacks = 0;
* calling function must keep 'iovars' until wlc_module_unregister is called.
* 'iovar' must have the last entry's name field being NULL as terminator.
*/
-int
-BCMATTACHFN(wlc_module_register) (wlc_pub_t *pub, const bcm_iovar_t *iovars,
- const char *name, void *hdl, iovar_fn_t i_fn,
- watchdog_fn_t w_fn, down_fn_t d_fn) {
+int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
+ const char *name, void *hdl, iovar_fn_t i_fn,
+ watchdog_fn_t w_fn, down_fn_t d_fn)
+{
wlc_info_t *wlc = (wlc_info_t *) pub->wlc;
int i;
}
/* unregister module callbacks */
-int
-BCMATTACHFN(wlc_module_unregister) (wlc_pub_t *pub, const char *name,
- void *hdl) {
+int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl)
+{
wlc_info_t *wlc = (wlc_info_t *) pub->wlc;
int i;
wlc->stf->txstreams);
}
-static void BCMATTACHFN(wlc_bss_default_init) (wlc_info_t *wlc)
+static void wlc_bss_default_init(wlc_info_t *wlc)
{
chanspec_t chanspec;
wlcband_t *band;
void *wl; /* pointer to os-specific private state */
};
-wlc_phy_shim_info_t *BCMATTACHFN(wlc_phy_shim_attach) (wlc_hw_info_t *wlc_hw,
+wlc_phy_shim_info_t *wlc_phy_shim_attach(wlc_hw_info_t *wlc_hw,
void *wl, void *wlc) {
wlc_phy_shim_info_t *physhim = NULL;
return physhim;
}
-void BCMATTACHFN(wlc_phy_shim_detach) (wlc_phy_shim_info_t *physhim)
+void wlc_phy_shim_detach(wlc_phy_shim_info_t *physhim)
{
if (!physhim)
return;
return ret_code;
}
-int BCMATTACHFN(wlc_stf_attach) (wlc_info_t *wlc)
+int wlc_stf_attach(wlc_info_t *wlc)
{
wlc->bandstate[BAND_2G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_SISO;
wlc->bandstate[BAND_5G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_CDD;
return 0;
}
-void BCMATTACHFN(wlc_stf_detach) (wlc_info_t *wlc)
+void wlc_stf_detach(wlc_info_t *wlc)
{
}
_wlc_stf_phy_txant_upd(wlc);
}
-void BCMATTACHFN(wlc_stf_phy_chain_calc) (wlc_info_t *wlc)
+void wlc_stf_phy_chain_calc(wlc_info_t *wlc)
{
/* get available rx/tx chains */
wlc->stf->hw_txchain = (u8) getintvar(wlc->pub->vars, "txchain");
}
/* parse the enumeration rom to identify all cores */
-void BCMATTACHFN(ai_scan) (si_t *sih, void *regs, uint devid)
+void ai_scan(si_t *sih, void *regs, uint devid)
{
si_info_t *sii = SI_INFO(sih);
chipcregs_t *cc = (chipcregs_t *) regs;
static int initvars_flash(si_t *sih, osl_t *osh, char **vp, uint len);
/* Initialization of varbuf structure */
-static void BCMATTACHFN(varbuf_init) (varbuf_t *b, char *buf, uint size)
+static void varbuf_init(varbuf_t *b, char *buf, uint size)
{
b->size = size;
b->base = b->buf = buf;
}
/* append a null terminated var=value string */
-static int BCMATTACHFN(varbuf_append) (varbuf_t *b, const char *fmt, ...)
+static int varbuf_append(varbuf_t *b, const char *fmt, ...)
{
va_list ap;
int r;
* Initialize local vars from the right source for this platform.
* Return 0 on success, nonzero on error.
*/
-int
-BCMATTACHFN(srom_var_init) (si_t *sih, uint bustype, void *curmap, osl_t *osh,
- char **vars, uint *count) {
+int srom_var_init(si_t *sih, uint bustype, void *curmap, osl_t *osh,
+ char **vars, uint *count)
+{
uint len;
len = 0;
/* For dongle HW, accept partial calibration parameters */
#define BCMDONGLECASE(n)
-int
-BCMATTACHFN(srom_parsecis) (osl_t *osh, u8 *pcis[], uint ciscnt,
- char **vars, uint *count)
+int srom_parsecis(osl_t *osh, u8 *pcis[], uint ciscnt, char **vars, uint *count)
{
char eabuf[32];
char *base;
* Create variable table from memory.
* Return 0 on success, nonzero on error.
*/
-static int
-BCMATTACHFN(initvars_table) (osl_t *osh, char *start, char *end, char **vars,
- uint *count) {
+static int initvars_table(osl_t *osh, char *start, char *end, char **vars,
+ uint *count)
+{
int c = (int)(end - start);
/* do it only when there is more than just the null string */
* of the table upon enter and to the end of the table upon exit when success.
* Return 0 on success, nonzero on error.
*/
-static int
-BCMATTACHFN(initvars_flash) (si_t *sih, osl_t *osh, char **base, uint len)
+static int initvars_flash(si_t *sih, osl_t *osh, char **base, uint len)
{
char *vp = *base;
char *flash;
* Initialize nonvolatile variable table from flash.
* Return 0 on success, nonzero on error.
*/
-static int
-BCMATTACHFN(initvars_flash_si) (si_t *sih, char **vars, uint *count)
+static int initvars_flash_si(si_t *sih, char **vars, uint *count)
{
osl_t *osh = si_osh(sih);
char *vp, *base;
}
#endif /* BCMDBG */
-static void
-BCMATTACHFN(_initvars_srom_pci) (u8 sromrev, u16 *srom, uint off,
- varbuf_t *b) {
+static void _initvars_srom_pci(u8 sromrev, u16 *srom, uint off, varbuf_t *b)
+{
u16 w;
u32 val;
const sromvar_t *srv;
* Initialize nonvolatile variable table from sprom.
* Return 0 on success, nonzero on error.
*/
-static int
-BCMATTACHFN(initvars_srom_pci) (si_t *sih, void *curmap, char **vars,
- uint *count) {
+static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count)
+{
u16 *srom, *sromwindow;
u8 sromrev = 0;
u32 sr;
* Read the SDIO cis and call parsecis to initialize the vars.
* Return 0 on success, nonzero on error.
*/
-static int
-BCMATTACHFN(initvars_cis_sdio) (osl_t *osh, char **vars, uint *count)
+static int initvars_cis_sdio(osl_t *osh, char **vars, uint *count)
{
u8 *cis[SBSDIO_NUM_FUNCTION + 1];
uint fn, numfn;
}
/* set SDIO sprom command register */
-static int BCMATTACHFN(sprom_cmd_sdio) (osl_t *osh, u8 cmd)
+static int sprom_cmd_sdio(osl_t *osh, u8 cmd)
{
u8 status = 0;
uint wait_cnt = 1000;
}
#endif /* BCMSDIO */
-static int
-BCMATTACHFN(initvars_srom_si) (si_t *sih, osl_t *osh, void *curmap,
- char **vars, uint *varsz) {
+static int initvars_srom_si(si_t *sih, osl_t *osh, void *curmap, char **vars,
+ uint *varsz)
+{
/* Search flash nvram section for srom variables */
return initvars_flash_si(sih, vars, varsz);
}
}
/* Setup switcher voltage */
-void
-BCMATTACHFN(si_pmu_set_switcher_voltage) (si_t *sih, osl_t *osh,
- u8 bb_voltage, u8 rf_voltage) {
+void si_pmu_set_switcher_voltage(si_t *sih, osl_t *osh, u8 bb_voltage,
+ u8 rf_voltage)
+{
chipcregs_t *cc;
uint origidx;
si_setcoreidx(sih, origidx);
}
-void
-BCMATTACHFN(si_pmu_set_ldo_voltage) (si_t *sih, osl_t *osh, u8 ldo,
- u8 voltage) {
+void si_pmu_set_ldo_voltage(si_t *sih, osl_t *osh, u8 ldo, u8 voltage)
+{
u8 sr_cntl_shift = 0, rc_shift = 0, shift = 0, mask = 0;
u8 addr = 0;
return (u16) delay;
}
-u32 BCMATTACHFN(si_pmu_force_ilp) (si_t *sih, osl_t *osh, bool force)
+u32 si_pmu_force_ilp(si_t *sih, osl_t *osh, bool force)
{
chipcregs_t *cc;
uint origidx;
};
/* TRUE if the power topology uses the buck boost to provide 3.3V to VDDIO_RF and WLAN PA */
-static bool BCMATTACHFN(si_pmu_res_depfltr_bb) (si_t *sih)
+static bool si_pmu_res_depfltr_bb(si_t *sih)
{
return (sih->boardflags & BFL_BUCKBOOST) != 0;
}
/* TRUE if the power topology doesn't use the cbuck. Key on chiprev also if the chip is BCM4325. */
-static bool BCMATTACHFN(si_pmu_res_depfltr_ncb) (si_t *sih)
+static bool si_pmu_res_depfltr_ncb(si_t *sih)
{
return (sih->boardflags & BFL_NOCBUCK) != 0;
}
/* TRUE if the power topology uses the PALDO */
-static bool BCMATTACHFN(si_pmu_res_depfltr_paldo) (si_t *sih)
+static bool si_pmu_res_depfltr_paldo(si_t *sih)
{
return (sih->boardflags & BFL_PALDO) != 0;
}
/* TRUE if the power topology doesn't use the PALDO */
-static bool BCMATTACHFN(si_pmu_res_depfltr_npaldo) (si_t *sih)
+static bool si_pmu_res_depfltr_npaldo(si_t *sih)
{
return (sih->boardflags & BFL_PALDO) == 0;
}
}
/* initialize PMU resources */
-void BCMATTACHFN(si_pmu_res_init) (si_t *sih, osl_t *osh)
+void si_pmu_res_init(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
* case the xtal frequency is unknown to the s/w so we need to call
* si_pmu1_xtaldef0() wherever it is needed to return a default value.
*/
-static void
-BCMATTACHFN(si_pmu1_pllinit0) (si_t *sih, osl_t *osh, chipcregs_t *cc,
- u32 xtal) {
+static void si_pmu1_pllinit0(si_t *sih, osl_t *osh, chipcregs_t *cc, u32 xtal)
+{
const pmu1_xtaltab0_t *xt;
u32 tmp;
u32 buf_strength = 0;
}
/* initialize PLL */
-void BCMATTACHFN(si_pmu_pll_init) (si_t *sih, osl_t *osh, uint xtalfreq)
+void si_pmu_pll_init(si_t *sih, osl_t *osh, uint xtalfreq)
{
chipcregs_t *cc;
uint origidx;
}
/* initialize PMU */
-void BCMATTACHFN(si_pmu_init) (si_t *sih, osl_t *osh)
+void si_pmu_init(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
#if defined(BCMDBG)
si_pmu_sprom_enable(si_t *sih, osl_t *osh, bool enable)
#else
-BCMATTACHFN(si_pmu_sprom_enable) (si_t *sih, osl_t *osh, bool enable)
+si_pmu_sprom_enable(si_t *sih, osl_t *osh, bool enable)
#endif
{
chipcregs_t *cc;
}
/* initialize PMU chip controls and other chip level stuff */
-void BCMATTACHFN(si_pmu_chip_init) (si_t *sih, osl_t *osh)
+void si_pmu_chip_init(si_t *sih, osl_t *osh)
{
uint origidx;
}
/* initialize PMU switch/regulators */
-void BCMATTACHFN(si_pmu_swreg_init) (si_t *sih, osl_t *osh)
+void si_pmu_swreg_init(si_t *sih, osl_t *osh)
{
ASSERT(sih->cccaps & CC_CAP_PMU);
#define EXT_ILP_HZ 32768
-u32 BCMATTACHFN(si_pmu_measure_alpclk) (si_t *sih, osl_t *osh)
+u32 si_pmu_measure_alpclk(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
return alp_khz;
}
-static void BCMATTACHFN(si_pmu_set_4330_plldivs) (si_t *sih)
+static void si_pmu_set_4330_plldivs(si_t *sih)
{
u32 FVCO = si_pmu1_pllfvco0(sih) / 1000;
u32 m1div, m2div, m3div, m4div, m5div, m6div;
}
/* ***** Functions called during driver state changes ***** */
-void BCMATTACHFN(pcicore_attach) (void *pch, char *pvars, int state)
+void pcicore_attach(void *pch, char *pvars, int state)
{
pcicore_info_t *pi = (pcicore_info_t *) pch;
si_t *sih = pi->sih;
}
#endif /* FLASH */
-int BCMATTACHFN(nvram_init) (void *si)
+int nvram_init(void *si)
{
/* Make sure we read nvram in flash just once before freeing the memory */
return 0;
}
-int BCMATTACHFN(nvram_append) (void *si, char *varlst, uint varsz)
+int nvram_append(void *si, char *varlst, uint varsz)
{
uint bufsz = VARS_T_OH;
vars_t *new;
return v;
}
-int BCMATTACHFN(nvram_set) (const char *name, const char *value)
+int nvram_set(const char *name, const char *value)
{
return 0;
}
-int BCMATTACHFN(nvram_unset) (const char *name)
+int nvram_unset(const char *name)
{
return 0;
}
-int BCMATTACHFN(nvram_reset) (void *si)
+int nvram_reset(void *si)
{
return 0;
}
-int BCMATTACHFN(nvram_commit) (void)
+int nvram_commit(void)
{
return 0;
}
}
/* return core index of the core with address 'sba' */
-static uint BCMATTACHFN(_sb_coreidx) (si_info_t *sii, u32 sba)
+static uint _sb_coreidx(si_info_t *sii, u32 sba)
{
uint i;
}
/* return core address of the current core */
-static u32 BCMATTACHFN(_sb_coresba) (si_info_t *sii)
+static u32 _sb_coresba(si_info_t *sii)
{
u32 sbaddr = 0;
* starting from bus 'sbba', inclusive.
*/
#define SB_MAXBUSES 2
-static uint
-BCMATTACHFN(_sb_scan) (si_info_t *sii, u32 sba, void *regs, uint bus,
- u32 sbba, uint numcores) {
+static uint _sb_scan(si_info_t *sii, u32 sba, void *regs, uint bus, u32 sbba,
+ uint numcores)
+{
uint next;
uint ncc = 0;
uint i;
}
/* scan the sb enumerated space to identify all cores */
-void BCMATTACHFN(sb_scan) (si_t *sih, void *regs, uint devid)
+void sb_scan(si_t *sih, void *regs, uint devid)
{
si_info_t *sii;
u32 origsba;
* vars - pointer to a pointer area for "environment" variables
* varsz - pointer to int to return the size of the vars
*/
-si_t *BCMATTACHFN(si_attach) (uint devid, osl_t *osh, void *regs,
- uint bustype, void *sdh, char **vars,
- uint *varsz) {
+si_t *si_attach(uint devid, osl_t *osh, void *regs, uint bustype, void *sdh,
+ char **vars, uint *varsz)
+{
si_info_t *sii;
/* alloc si_info_t */
/* global kernel resource */
static si_info_t ksii;
-static bool
-BCMATTACHFN(si_buscore_prep) (si_info_t *sii, uint bustype, uint devid,
- void *sdh) {
+static bool si_buscore_prep(si_info_t *sii, uint bustype, uint devid,
+ void *sdh)
+{
#ifndef BRCM_FULLMAC
/* kludge to enable the clock on the 4306 which lacks a slowclock */
return TRUE;
}
-static bool
-BCMATTACHFN(si_buscore_setup) (si_info_t *sii, chipcregs_t *cc, uint bustype,
- u32 savewin, uint *origidx, void *regs) {
+static bool si_buscore_setup(si_info_t *sii, chipcregs_t *cc, uint bustype,
+ u32 savewin, uint *origidx, void *regs)
+{
bool pci, pcie;
uint i;
uint pciidx, pcieidx, pcirev, pcierev;
return TRUE;
}
-static __used void BCMATTACHFN(si_nvram_process) (si_info_t *sii, char *pvars)
+static __used void si_nvram_process(si_info_t *sii, char *pvars)
{
uint w = 0;
/* this is will make Sonics calls directly, since Sonics is no longer supported in the Si abstraction */
/* this has been customized for the bcm 4329 ONLY */
#ifdef BCMSDIO
-static si_info_t *BCMATTACHFN(si_doattach) (si_info_t *sii, uint devid,
- osl_t *osh, void *regs,
- uint bustype, void *sdh,
- char **vars, uint *varsz) {
+static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh,
+ void *regs, uint bustype, void *sdh,
+ char **vars, uint *varsz)
+{
struct si_pub *sih = &sii->pub;
u32 w, savewin;
chipcregs_t *cc;
}
#else /* BCMSDIO */
-static si_info_t *BCMATTACHFN(si_doattach) (si_info_t *sii, uint devid,
- osl_t *osh, void *regs,
- uint bustype, void *sdh,
- char **vars, uint *varsz) {
+static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh,
+ void *regs, uint bustype, void *sdh,
+ char **vars, uint *varsz)
+{
struct si_pub *sih = &sii->pub;
u32 w, savewin;
chipcregs_t *cc;
#endif /* BCMSDIO */
/* may be called with core in reset */
-void BCMATTACHFN(si_detach) (si_t *sih)
+void si_detach(si_t *sih)
{
si_info_t *sii;
uint idx;
}
/* Build device path. Support SI, PCI, and JTAG for now. */
-int BCMATTACHFN(si_devpath) (si_t *sih, char *path, int size)
+int si_devpath(si_t *sih, char *path, int size)
{
int slen;
}
/* Get a variable, but only if it has a devpath prefix */
-char *BCMATTACHFN(si_getdevpathvar) (si_t *sih, const char *name)
+char *si_getdevpathvar(si_t *sih, const char *name)
{
char varname[SI_DEVPATH_BUFSZ + 32];
}
/* Get a variable, but only if it has a devpath prefix */
-int BCMATTACHFN(si_getdevpathintvar) (si_t *sih, const char *name)
+int si_getdevpathintvar(si_t *sih, const char *name)
{
#if defined(BCMBUSTYPE) && (BCMBUSTYPE == SI_BUS)
return getintvar(NULL, name);
* Nothing is done to the arguments if len == 0 or var is NULL, var is still returned.
* On overflow, the first char will be set to '\0'.
*/
-static char *BCMATTACHFN(si_devpathvar) (si_t *sih, char *var, int len,
- const char *name) {
+static char *si_devpathvar(si_t *sih, char *var, int len, const char *name)
+{
uint path_len;
if (!var || len <= 0)
}
#endif /* BCMSDIO */
-bool BCMATTACHFN(si_pci_war16165) (si_t *sih)
+bool si_pci_war16165(si_t *sih)
{
si_info_t *sii;
* Configure the pci core for pci client (NIC) action
* coremask is the bitvec of cores by index to be enabled.
*/
-void BCMATTACHFN(si_pci_setup) (si_t *sih, uint coremask)
+void si_pci_setup(si_t *sih, uint coremask)
{
si_info_t *sii;
sbpciregs_t *pciregs = NULL;