Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249325
b: refs/heads/master
c: aa4eec9
h: refs/heads/master
i:
  249323: 46b5155
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed May 3, 2011
1 parent 7831a0f commit 70b62ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 2d1a826db7f73692e6895455f5d9c297447b5025
refs/heads/master: aa4eec9350e07a3d6ac331b0f5fc62a6065b01d2
15 changes: 12 additions & 3 deletions trunk/drivers/staging/brcm80211/brcmsmac/wlc_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,7 +1792,10 @@ u32 si_pmu_measure_alpclk(si_t *sih)
if (R_REG(&cc->pmustatus) & PST_EXTLPOAVAIL) {
u32 ilp_ctr, alp_hz;

/* Enable the reg to measure the freq, in case disabled before */
/*
* Enable the reg to measure the freq,
* in case it was disabled before
*/
W_REG(&cc->pmu_xtalfreq,
1U << PMU_XTALFREQ_REG_MEASURE_SHIFT);

Expand All @@ -1803,13 +1806,19 @@ u32 si_pmu_measure_alpclk(si_t *sih)
ilp_ctr =
R_REG(&cc->pmu_xtalfreq) & PMU_XTALFREQ_REG_ILPCTR_MASK;

/* Turn off the PMU_XTALFREQ_REG_MEASURE_SHIFT bit to save power */
/*
* Turn off the PMU_XTALFREQ_REG_MEASURE_SHIFT
* bit to save power
*/
W_REG(&cc->pmu_xtalfreq, 0);

/* Calculate ALP frequency */
alp_hz = (ilp_ctr * EXT_ILP_HZ) / 4;

/* Round to nearest 100KHz, and at the same time convert to KHz */
/*
* Round to nearest 100KHz, and at
* the same time convert to KHz
*/
alp_khz = (alp_hz + 50000) / 100000 * 100;
} else
alp_khz = 0;
Expand Down

0 comments on commit 70b62ef

Please sign in to comment.