summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-03-25 11:25:54 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-04 22:36:11 -0700
commit014cdb5f454486b20de0e6358fb3692dbe067557 (patch)
treeff35092948ffd6ab9129bab4c1150ee245766621
parent6b5a5a3eb77ea69382da9d2a64d74107e49cedaa (diff)
downloadop-kernel-dev-014cdb5f454486b20de0e6358fb3692dbe067557.zip
op-kernel-dev-014cdb5f454486b20de0e6358fb3692dbe067557.tar.gz
staging: brcm80211: cleanup si_doattach function for fullmac
si_doattach for the fullmac driver is selected using BCMSDIO flag. Within the function there are #ifdef BRCM_FULLMAC but this is implicitly true so these have been removed and the function itself is now between #ifdef BRCM_FULLMAC instead of BCMSDIO. Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/brcm80211/util/siutils.c59
1 files changed, 3 insertions, 56 deletions
diff --git a/drivers/staging/brcm80211/util/siutils.c b/drivers/staging/brcm80211/util/siutils.c
index ed168ce..a77b457 100644
--- a/drivers/staging/brcm80211/util/siutils.c
+++ b/drivers/staging/brcm80211/util/siutils.c
@@ -364,7 +364,7 @@ static __used void si_nvram_process(si_info_t *sii, char *pvars)
/* 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
+#ifdef BRCM_FULLMAC
static si_info_t *si_doattach(si_info_t *sii, uint devid,
void *regs, uint bustype, void *pbus,
char **vars, uint *varsz)
@@ -372,7 +372,6 @@ static si_info_t *si_doattach(si_info_t *sii, uint devid,
struct si_pub *sih = &sii->pub;
u32 w, savewin;
chipcregs_t *cc;
- char *pvars = NULL;
uint origidx;
ASSERT(GOODREGS(regs));
@@ -431,69 +430,17 @@ static si_info_t *si_doattach(si_info_t *sii, uint devid,
goto exit;
}
-#ifdef BRCM_FULLMAC
- pvars = NULL;
-#else
- /* Init nvram from flash if it exists */
- nvram_init((void *)&(sii->pub));
-
- /* Init nvram from sprom/otp if they exist */
- if (srom_var_init
- (&sii->pub, bustype, regs, sii->osh, vars, varsz)) {
- SI_ERROR(("si_doattach: srom_var_init failed: bad srom\n"));
- goto exit;
- }
- pvars = vars ? *vars : NULL;
- si_nvram_process(sii, pvars);
-#endif
-
- /* === NVRAM, clock is ready === */
-
-#ifdef BRCM_FULLMAC
- if (sii->pub.ccrev >= 20) {
-#endif
cc = (chipcregs_t *) si_setcore(sih, CC_CORE_ID, 0);
W_REG(&cc->gpiopullup, 0);
W_REG(&cc->gpiopulldown, 0);
sb_setcoreidx(sih, origidx);
-#ifdef BRCM_FULLMAC
- }
-#endif
-
-#ifndef BRCM_FULLMAC
- /* PMU specific initializations */
- if (PMUCTL_ENAB(sih)) {
- u32 xtalfreq;
- si_pmu_init(sih);
- si_pmu_chip_init(sih);
- xtalfreq = getintvar(pvars, "xtalfreq");
- /* If xtalfreq var not available, try to measure it */
- if (xtalfreq == 0)
- xtalfreq = si_pmu_measure_alpclk(sih);
- si_pmu_pll_init(sih, xtalfreq);
- si_pmu_res_init(sih);
- si_pmu_swreg_init(sih);
- }
-
- /* setup the GPIO based LED powersave register */
- w = getintvar(pvars, "leddc");
- if (w == 0)
- w = DEFAULT_GPIOTIMERVAL;
- sb_corereg(sih, SI_CC_IDX, offsetof(chipcregs_t, gpiotimerval), ~0, w);
-
-#ifdef BCMDBG
- /* clear any previous epidiag-induced target abort */
- sb_taclear(sih, false);
-#endif /* BCMDBG */
-#endif
return sii;
exit:
return NULL;
}
-
-#else /* BCMSDIO */
+#else /* BRCM_FULLMAC */
static si_info_t *si_doattach(si_info_t *sii, uint devid,
void *regs, uint bustype, void *pbus,
char **vars, uint *varsz)
@@ -685,7 +632,7 @@ static si_info_t *si_doattach(si_info_t *sii, uint devid,
return NULL;
}
-#endif /* BCMSDIO */
+#endif /* BRCM_FULLMAC */
/* may be called with core in reset */
void si_detach(si_t *sih)
OpenPOWER on IntegriCloud