diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-06-30 09:16:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-10 12:16:49 -0400 |
commit | 4d22641b927380913f6bc859626e694adece928e (patch) | |
tree | 411166810e6c356296a9bdda81c0112992814784 /drivers/net/wireless/brcm80211 | |
parent | 40bd94ce327420b373551b289645f6a3a2b80e9a (diff) |
brcmsmac: remove si_pmu_init() and si_pmu_res_init()
This is already done by bcma_pmu_init() and bcma_pmu_resources_init() in bcma.
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/pmu.c | 76 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/pmu.h | 2 |
3 files changed, 0 insertions, 80 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c index 4abf9b679268..c15d9fc2ffdd 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | |||
@@ -503,9 +503,7 @@ static struct si_info *ai_doattach(struct si_info *sii, | |||
503 | 503 | ||
504 | /* PMU specific initializations */ | 504 | /* PMU specific initializations */ |
505 | if (ai_get_cccaps(sih) & CC_CAP_PMU) { | 505 | if (ai_get_cccaps(sih) & CC_CAP_PMU) { |
506 | si_pmu_init(sih); | ||
507 | (void)si_pmu_measure_alpclk(sih); | 506 | (void)si_pmu_measure_alpclk(sih); |
508 | si_pmu_res_init(sih); | ||
509 | } | 507 | } |
510 | 508 | ||
511 | /* setup the GPIO based LED powersave register */ | 509 | /* setup the GPIO based LED powersave register */ |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/pmu.c b/drivers/net/wireless/brcm80211/brcmsmac/pmu.c index 0399a865e332..045f43a0a647 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/pmu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/pmu.c | |||
@@ -108,37 +108,6 @@ | |||
108 | #define RES4313_HT_AVAIL_RSRC 14 | 108 | #define RES4313_HT_AVAIL_RSRC 14 |
109 | #define RES4313_MACPHY_CLK_AVAIL_RSRC 15 | 109 | #define RES4313_MACPHY_CLK_AVAIL_RSRC 15 |
110 | 110 | ||
111 | /* Determine min/max rsrc masks. Value 0 leaves hardware at default. */ | ||
112 | static void si_pmu_res_masks(struct si_pub *sih, u32 * pmin, u32 * pmax) | ||
113 | { | ||
114 | u32 min_mask = 0, max_mask = 0; | ||
115 | uint rsrcs; | ||
116 | |||
117 | /* # resources */ | ||
118 | rsrcs = (ai_get_pmucaps(sih) & PCAP_RC_MASK) >> PCAP_RC_SHIFT; | ||
119 | |||
120 | /* determine min/max rsrc masks */ | ||
121 | switch (ai_get_chip_id(sih)) { | ||
122 | case BCM43224_CHIP_ID: | ||
123 | case BCM43225_CHIP_ID: | ||
124 | /* ??? */ | ||
125 | break; | ||
126 | |||
127 | case BCM4313_CHIP_ID: | ||
128 | min_mask = PMURES_BIT(RES4313_BB_PU_RSRC) | | ||
129 | PMURES_BIT(RES4313_XTAL_PU_RSRC) | | ||
130 | PMURES_BIT(RES4313_ALP_AVAIL_RSRC) | | ||
131 | PMURES_BIT(RES4313_BB_PLL_PWRSW_RSRC); | ||
132 | max_mask = 0xffff; | ||
133 | break; | ||
134 | default: | ||
135 | break; | ||
136 | } | ||
137 | |||
138 | *pmin = min_mask; | ||
139 | *pmax = max_mask; | ||
140 | } | ||
141 | |||
142 | void si_pmu_spuravoid_pllupdate(struct si_pub *sih, u8 spuravoid) | 111 | void si_pmu_spuravoid_pllupdate(struct si_pub *sih, u8 spuravoid) |
143 | { | 112 | { |
144 | u32 tmp = 0; | 113 | u32 tmp = 0; |
@@ -284,51 +253,6 @@ u32 si_pmu_alp_clock(struct si_pub *sih) | |||
284 | return clock; | 253 | return clock; |
285 | } | 254 | } |
286 | 255 | ||
287 | /* initialize PMU */ | ||
288 | void si_pmu_init(struct si_pub *sih) | ||
289 | { | ||
290 | struct si_info *sii = container_of(sih, struct si_info, pub); | ||
291 | struct bcma_device *core; | ||
292 | |||
293 | /* select chipc */ | ||
294 | core = sii->icbus->drv_cc.core; | ||
295 | |||
296 | if (ai_get_pmurev(sih) == 1) | ||
297 | bcma_mask32(core, CHIPCREGOFFS(pmucontrol), | ||
298 | ~PCTL_NOILP_ON_WAIT); | ||
299 | else if (ai_get_pmurev(sih) >= 2) | ||
300 | bcma_set32(core, CHIPCREGOFFS(pmucontrol), PCTL_NOILP_ON_WAIT); | ||
301 | } | ||
302 | |||
303 | /* initialize PMU resources */ | ||
304 | void si_pmu_res_init(struct si_pub *sih) | ||
305 | { | ||
306 | struct si_info *sii = container_of(sih, struct si_info, pub); | ||
307 | struct bcma_device *core; | ||
308 | u32 min_mask = 0, max_mask = 0; | ||
309 | |||
310 | /* select to chipc */ | ||
311 | core = sii->icbus->drv_cc.core; | ||
312 | |||
313 | /* Determine min/max rsrc masks */ | ||
314 | si_pmu_res_masks(sih, &min_mask, &max_mask); | ||
315 | |||
316 | /* It is required to program max_mask first and then min_mask */ | ||
317 | |||
318 | /* Program max resource mask */ | ||
319 | |||
320 | if (max_mask) | ||
321 | bcma_write32(core, CHIPCREGOFFS(max_res_mask), max_mask); | ||
322 | |||
323 | /* Program min resource mask */ | ||
324 | |||
325 | if (min_mask) | ||
326 | bcma_write32(core, CHIPCREGOFFS(min_res_mask), min_mask); | ||
327 | |||
328 | /* Add some delay; allow resources to come up and settle. */ | ||
329 | mdelay(2); | ||
330 | } | ||
331 | |||
332 | u32 si_pmu_measure_alpclk(struct si_pub *sih) | 256 | u32 si_pmu_measure_alpclk(struct si_pub *sih) |
333 | { | 257 | { |
334 | struct si_info *sii = container_of(sih, struct si_info, pub); | 258 | struct si_info *sii = container_of(sih, struct si_info, pub); |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/pmu.h b/drivers/net/wireless/brcm80211/brcmsmac/pmu.h index 3e39c5e0f9ff..2f0ad2830ab1 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/pmu.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/pmu.h | |||
@@ -28,8 +28,6 @@ extern u32 si_pmu_alp_clock(struct si_pub *sih); | |||
28 | extern void si_pmu_pllupd(struct si_pub *sih); | 28 | extern void si_pmu_pllupd(struct si_pub *sih); |
29 | extern void si_pmu_spuravoid_pllupdate(struct si_pub *sih, u8 spuravoid); | 29 | extern void si_pmu_spuravoid_pllupdate(struct si_pub *sih, u8 spuravoid); |
30 | extern u32 si_pmu_pllcontrol(struct si_pub *sih, uint reg, u32 mask, u32 val); | 30 | extern u32 si_pmu_pllcontrol(struct si_pub *sih, uint reg, u32 mask, u32 val); |
31 | extern void si_pmu_init(struct si_pub *sih); | ||
32 | extern void si_pmu_res_init(struct si_pub *sih); | ||
33 | extern u32 si_pmu_measure_alpclk(struct si_pub *sih); | 31 | extern u32 si_pmu_measure_alpclk(struct si_pub *sih); |
34 | 32 | ||
35 | #endif /* _BRCM_PMU_H_ */ | 33 | #endif /* _BRCM_PMU_H_ */ |