* The following macros specify special linker sections that can be reclaimed
* after a system is considered 'up'.
*/
-#define BCMINITFN(_fn) _fn
#define BCMUNINITFN(_fn) _fn
#define BCMNMIATTACHFN(_fn) _fn
#ifdef mips
* Read the reset GPIO value from the nvram and set the GPIO
* as input
*/
-extern int BCMINITFN(nvram_resetgpio_init) (void *sih);
+extern int nvram_resetgpio_init(void *sih);
/*
* Get the value of an NVRAM variable.
pi->init_in_progress = FALSE;
}
-void BCMINITFN(wlc_phy_cal_init) (wlc_phy_t *pih)
+void wlc_phy_cal_init(wlc_phy_t *pih)
{
phy_info_t *pi = (phy_info_t *) pih;
initfn_t cal_init = NULL;
}
-void BCMINITFN(wlc_bmac_reset) (wlc_hw_info_t *wlc_hw)
+void wlc_bmac_reset(wlc_hw_info_t *wlc_hw)
{
WL_TRACE(("wl%d: wlc_bmac_reset\n", wlc_hw->unit));
}
void
-BCMINITFN(wlc_bmac_init) (wlc_hw_info_t *wlc_hw, chanspec_t chanspec,
+wlc_bmac_init(wlc_hw_info_t *wlc_hw, chanspec_t chanspec,
bool mute) {
u32 macintmask;
bool fastclk;
wlc_clkctl_clk(wlc_hw, CLK_DYNAMIC);
}
-int BCMINITFN(wlc_bmac_up_prep) (wlc_hw_info_t *wlc_hw)
+int wlc_bmac_up_prep(wlc_hw_info_t *wlc_hw)
{
uint coremask;
return 0;
}
-int BCMINITFN(wlc_bmac_up_finish) (wlc_hw_info_t *wlc_hw)
+int wlc_bmac_up_finish(wlc_hw_info_t *wlc_hw)
{
WL_TRACE(("wl%d: %s:\n", wlc_hw->unit, __func__));
/* set initial host flags value */
static void
-BCMINITFN(wlc_mhfdef) (wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init)
+wlc_mhfdef(wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init)
{
wlc_hw_info_t *wlc_hw = wlc->hw;
return goodboard;
}
-static char *BCMINITFN(wlc_get_macaddr) (wlc_hw_info_t *wlc_hw)
+static char *wlc_get_macaddr(wlc_hw_info_t *wlc_hw)
{
const char *varname = "macaddr";
char *macaddr;
}
/* Initialize just the hardware when coming out of POR or S3/S5 system states */
-void BCMINITFN(wlc_bmac_hw_up) (wlc_hw_info_t *wlc_hw)
+void wlc_bmac_hw_up(wlc_hw_info_t *wlc_hw)
{
if (wlc_hw->wlc->pub->hw_up)
return;
* clear software macintstatus for fresh new start
* one testing hack wlc_hw->noreset will bypass the d11/phy reset
*/
-void BCMINITFN(wlc_bmac_corereset) (wlc_hw_info_t *wlc_hw, u32 flags)
+void wlc_bmac_corereset(wlc_hw_info_t *wlc_hw, u32 flags)
{
d11regs_t *regs;
uint i;
* txfifo sizes needs to be modified(increased) since the newer cores
* have more memory.
*/
-static void BCMINITFN(wlc_corerev_fifofixup) (wlc_hw_info_t *wlc_hw)
+static void wlc_corerev_fifofixup(wlc_hw_info_t *wlc_hw)
{
d11regs_t *regs = wlc_hw->regs;
u16 fifo_nu;
* config other core registers
* init dma
*/
-static void BCMINITFN(wlc_coreinit) (wlc_info_t *wlc)
+static void wlc_coreinit(wlc_info_t *wlc)
{
wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs;
}
/* Initialize GPIOs that are controlled by D11 core */
-static void BCMINITFN(wlc_gpio_init) (wlc_info_t *wlc)
+static void wlc_gpio_init(wlc_info_t *wlc)
{
wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs;
return TRUE;
}
-void BCMINITFN(wlc_reset) (wlc_info_t *wlc)
+void wlc_reset(wlc_info_t *wlc)
{
WL_TRACE(("wl%d: wlc_reset\n", wlc->pub->unit));
* if other configurations are in conflict (bandlocked, 11n mode disabled,
* invalid channel for current country, etc.)
*/
-static chanspec_t BCMINITFN(wlc_init_chanspec) (wlc_info_t *wlc)
+static chanspec_t wlc_init_chanspec(wlc_info_t *wlc)
{
chanspec_t chanspec =
1 | WL_CHANSPEC_BW_20 | WL_CHANSPEC_CTL_SB_NONE |
scb->seqnum[i] = 0;
}
-void BCMINITFN(wlc_init) (wlc_info_t *wlc)
+void wlc_init(wlc_info_t *wlc)
{
d11regs_t *regs;
chanspec_t chanspec;
}
/* make interface operational */
-int BCMINITFN(wlc_up) (wlc_info_t *wlc)
+int wlc_up(wlc_info_t *wlc)
{
WL_TRACE(("wl%d: %s:\n", wlc->pub->unit, __func__));
}
/* Initialize the base precedence map for dequeueing from txq based on WME settings */
-static void BCMINITFN(wlc_tx_prec_map_init) (wlc_info_t *wlc)
+static void wlc_tx_prec_map_init(wlc_info_t *wlc)
{
wlc->tx_prec_map = WLC_PREC_BMP_ALL;
bzero(wlc->fifo2prec_map, sizeof(u16) * NFIFO);
/* d11 slow to fast clock transition time in slow clock cycles */
#define D11SCC_SLOW2FAST_TRANSITION 2
-u16 BCMINITFN(si_pmu_fast_pwrup_delay) (si_t *sih, osl_t *osh)
+u16 si_pmu_fast_pwrup_delay(si_t *sih, osl_t *osh)
{
uint delay = PMU_MAX_TRANSITION_DLY;
chipcregs_t *cc;
#define PMU1_XTALTAB0_960_48000K 15
/* select xtal table for each chip */
-static const pmu1_xtaltab0_t *BCMINITFN(si_pmu1_xtaltab0) (si_t *sih)
+static const pmu1_xtaltab0_t *si_pmu1_xtaltab0(si_t *sih)
{
#ifdef BCMDBG
char chn[8];
}
/* select default xtal frequency for each chip */
-static const pmu1_xtaltab0_t *BCMINITFN(si_pmu1_xtaldef0) (si_t *sih)
+static const pmu1_xtaltab0_t *si_pmu1_xtaldef0(si_t *sih)
{
#ifdef BCMDBG
char chn[8];
}
/* select default pll fvco for each chip */
-static u32 BCMINITFN(si_pmu1_pllfvco0) (si_t *sih)
+static u32 si_pmu1_pllfvco0(si_t *sih)
{
#ifdef BCMDBG
char chn[8];
/* query alp/xtal clock frequency */
static u32
-BCMINITFN(si_pmu1_alpclk0) (si_t *sih, osl_t *osh, chipcregs_t *cc)
+si_pmu1_alpclk0(si_t *sih, osl_t *osh, chipcregs_t *cc)
{
const pmu1_xtaltab0_t *xt;
u32 xf;
/* query the CPU clock frequency */
static u32
-BCMINITFN(si_pmu1_cpuclk0) (si_t *sih, osl_t *osh, chipcregs_t *cc)
+si_pmu1_cpuclk0(si_t *sih, osl_t *osh, chipcregs_t *cc)
{
u32 tmp, m1div;
#ifdef BCMDBG
}
/* query alp/xtal clock frequency */
-u32 BCMINITFN(si_pmu_alp_clock) (si_t *sih, osl_t *osh)
+u32 si_pmu_alp_clock(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
* pllreg "pll0" i.e. 12 for main 6 for phy, 0 for misc.
*/
static u32
-BCMINITFN(si_pmu5_clock) (si_t *sih, osl_t *osh, chipcregs_t *cc, uint pll0,
+si_pmu5_clock(si_t *sih, osl_t *osh, chipcregs_t *cc, uint pll0,
uint m) {
u32 tmp, div, ndiv, p1, p2, fc;
/* For designs that feed the same clock to both backplane
* and CPU just return the CPU clock speed.
*/
-u32 BCMINITFN(si_pmu_si_clock) (si_t *sih, osl_t *osh)
+u32 si_pmu_si_clock(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
}
/* query CPU clock frequency */
-u32 BCMINITFN(si_pmu_cpu_clock) (si_t *sih, osl_t *osh)
+u32 si_pmu_cpu_clock(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
}
/* query memory clock frequency */
-u32 BCMINITFN(si_pmu_mem_clock) (si_t *sih, osl_t *osh)
+u32 si_pmu_mem_clock(si_t *sih, osl_t *osh)
{
chipcregs_t *cc;
uint origidx;
static u32 ilpcycles_per_sec;
-u32 BCMINITFN(si_pmu_ilp_clock) (si_t *sih, osl_t *osh)
+u32 si_pmu_ilp_clock(si_t *sih, osl_t *osh)
{
if (ISSIM_ENAB(sih))
return ILP_CLOCK;
#define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu))
void
-BCMINITFN(si_sdiod_drive_strength_init) (si_t *sih, osl_t *osh,
+si_sdiod_drive_strength_init(si_t *sih, osl_t *osh,
u32 drivestrength) {
chipcregs_t *cc;
uint origidx, intr_val = 0;
/* Return up time in ILP cycles for the given resource. */
static uint
-BCMINITFN(si_pmu_res_uptime) (si_t *sih, osl_t *osh, chipcregs_t *cc,
+si_pmu_res_uptime(si_t *sih, osl_t *osh, chipcregs_t *cc,
u8 rsrc) {
u32 deps;
uint up, i, dup, dmax;
/* Fix MISC config to allow coming out of L2/L3-Ready state w/o PRST */
/* Needs to happen when coming out of 'standby'/'hibernate' */
-static void BCMINITFN(pcie_misc_config_fixup) (pcicore_info_t *pi)
+static void pcie_misc_config_fixup(pcicore_info_t *pi)
{
sbpcieregs_t *pcieregs = pi->regs.pcieregs;
u16 val16, *reg16;
#if defined(FLASH)
/* copy flash to ram */
-static void BCMINITFN(get_flash_nvram) (si_t *sih, struct nvram_header *nvh)
+static void get_flash_nvram(si_t *sih, struct nvram_header *nvh)
{
osl_t *osh;
uint nvs, bufsz;
static char *si_devpathvar(si_t *sih, char *var, int len, const char *name);
static bool _si_clkctl_cc(si_info_t *sii, uint mode);
static bool si_ispcie(si_info_t *sii);
-static uint BCMINITFN(socram_banksize) (si_info_t *sii, sbsocramregs_t *r,
+static uint socram_banksize(si_info_t *sii, sbsocramregs_t *r,
u8 idx, u8 mtype);
/* global variable to indicate reservation/release of gpio's */
#endif
}
-u32 BCMINITFN(si_alp_clock) (si_t *sih)
+u32 si_alp_clock(si_t *sih)
{
if (PMUCTL_ENAB(sih))
return si_pmu_alp_clock(sih, si_osh(sih));
return ALP_CLOCK;
}
-u32 BCMINITFN(si_ilp_clock) (si_t *sih)
+u32 si_ilp_clock(si_t *sih)
{
if (PMUCTL_ENAB(sih))
return si_pmu_ilp_clock(sih, si_osh(sih));
return 0;
}
-static void BCMINITFN(si_clkctl_setdelay) (si_info_t *sii, void *chipcregs)
+static void si_clkctl_setdelay(si_info_t *sii, void *chipcregs)
{
chipcregs_t *cc = (chipcregs_t *) chipcregs;
uint slowmaxfreq, pll_delay, slowclk;
}
/* initialize power control delay registers */
-void BCMINITFN(si_clkctl_init) (si_t *sih)
+void si_clkctl_init(si_t *sih)
{
si_info_t *sii;
uint origidx = 0;
}
/* return the value suitable for writing to the dot11 core FAST_PWRUP_DELAY register */
-u16 BCMINITFN(si_clkctl_fast_pwrup_delay) (si_t *sih)
+u16 si_clkctl_fast_pwrup_delay(si_t *sih)
{
si_info_t *sii;
uint origidx = 0;
return PCI(sii) && (sih->buscorerev <= 10);
}
-void BCMINITFN(si_pci_up) (si_t *sih)
+void si_pci_up(si_t *sih)
{
si_info_t *sii;
}
/* Unconfigure and/or apply various WARs when going down */
-void BCMINITFN(si_pci_down) (si_t *sih)
+void si_pci_down(si_t *sih)
{
si_info_t *sii;