Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248973
b: refs/heads/master
c: 014cdb5
h: refs/heads/master
i:
  248971: b3009ba
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Apr 5, 2011
1 parent c1f1b1b commit 754255f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 57 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b5a5a3eb77ea69382da9d2a64d74107e49cedaa
refs/heads/master: 014cdb5f454486b20de0e6358fb3692dbe067557
59 changes: 3 additions & 56 deletions trunk/drivers/staging/brcm80211/util/siutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,14 @@ 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)
{
struct si_pub *sih = &sii->pub;
u32 w, savewin;
chipcregs_t *cc;
char *pvars = NULL;
uint origidx;

ASSERT(GOODREGS(regs));
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 754255f

Please sign in to comment.