diff options
author | Arend van Spriel <arend@broadcom.com> | 2011-12-08 18:06:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-13 15:31:48 -0500 |
commit | b2ffec46ea230acac52170dd0a747526328d25fe (patch) | |
tree | e083340fc281c502a6aafcf11275da89675bb92a /drivers/net/wireless/brcm80211/brcmsmac/pmu.c | |
parent | 2e397c303807fadcf65f4e070603107453db4352 (diff) |
brcm80211: smac: use inline access functions for struct si_pub fields
Instead of directly accessing the fields in struct si_pub the driver
now uses inline access functions. This is in preparation of the bcma
integration as a lot of information will be provided by bcma module.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/pmu.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/pmu.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/pmu.c b/drivers/net/wireless/brcm80211/brcmsmac/pmu.c index 12ba575f5785..d4e909a6f2ab 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/pmu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/pmu.c | |||
@@ -115,10 +115,10 @@ static void si_pmu_res_masks(struct si_pub *sih, u32 * pmin, u32 * pmax) | |||
115 | uint rsrcs; | 115 | uint rsrcs; |
116 | 116 | ||
117 | /* # resources */ | 117 | /* # resources */ |
118 | rsrcs = (sih->pmucaps & PCAP_RC_MASK) >> PCAP_RC_SHIFT; | 118 | rsrcs = (ai_get_pmucaps(sih) & PCAP_RC_MASK) >> PCAP_RC_SHIFT; |
119 | 119 | ||
120 | /* determine min/max rsrc masks */ | 120 | /* determine min/max rsrc masks */ |
121 | switch (sih->chip) { | 121 | switch (ai_get_chip_id(sih)) { |
122 | case BCM43224_CHIP_ID: | 122 | case BCM43224_CHIP_ID: |
123 | case BCM43225_CHIP_ID: | 123 | case BCM43225_CHIP_ID: |
124 | /* ??? */ | 124 | /* ??? */ |
@@ -145,7 +145,7 @@ si_pmu_spuravoid_pllupdate(struct si_pub *sih, struct chipcregs __iomem *cc, | |||
145 | { | 145 | { |
146 | u32 tmp = 0; | 146 | u32 tmp = 0; |
147 | 147 | ||
148 | switch (sih->chip) { | 148 | switch (ai_get_chip_id(sih)) { |
149 | case BCM43224_CHIP_ID: | 149 | case BCM43224_CHIP_ID: |
150 | case BCM43225_CHIP_ID: | 150 | case BCM43225_CHIP_ID: |
151 | if (spuravoid == 1) { | 151 | if (spuravoid == 1) { |
@@ -207,7 +207,7 @@ u16 si_pmu_fast_pwrup_delay(struct si_pub *sih) | |||
207 | { | 207 | { |
208 | uint delay = PMU_MAX_TRANSITION_DLY; | 208 | uint delay = PMU_MAX_TRANSITION_DLY; |
209 | 209 | ||
210 | switch (sih->chip) { | 210 | switch (ai_get_chip_id(sih)) { |
211 | case BCM43224_CHIP_ID: | 211 | case BCM43224_CHIP_ID: |
212 | case BCM43225_CHIP_ID: | 212 | case BCM43225_CHIP_ID: |
213 | case BCM4313_CHIP_ID: | 213 | case BCM4313_CHIP_ID: |
@@ -276,10 +276,10 @@ u32 si_pmu_alp_clock(struct si_pub *sih) | |||
276 | u32 clock = ALP_CLOCK; | 276 | u32 clock = ALP_CLOCK; |
277 | 277 | ||
278 | /* bail out with default */ | 278 | /* bail out with default */ |
279 | if (!(sih->cccaps & CC_CAP_PMU)) | 279 | if (!(ai_get_cccaps(sih) & CC_CAP_PMU)) |
280 | return clock; | 280 | return clock; |
281 | 281 | ||
282 | switch (sih->chip) { | 282 | switch (ai_get_chip_id(sih)) { |
283 | case BCM43224_CHIP_ID: | 283 | case BCM43224_CHIP_ID: |
284 | case BCM43225_CHIP_ID: | 284 | case BCM43225_CHIP_ID: |
285 | case BCM4313_CHIP_ID: | 285 | case BCM4313_CHIP_ID: |
@@ -319,9 +319,9 @@ void si_pmu_init(struct si_pub *sih) | |||
319 | origidx = ai_coreidx(sih); | 319 | origidx = ai_coreidx(sih); |
320 | cc = ai_setcoreidx(sih, SI_CC_IDX); | 320 | cc = ai_setcoreidx(sih, SI_CC_IDX); |
321 | 321 | ||
322 | if (sih->pmurev == 1) | 322 | if (ai_get_pmurev(sih) == 1) |
323 | AND_REG(&cc->pmucontrol, ~PCTL_NOILP_ON_WAIT); | 323 | AND_REG(&cc->pmucontrol, ~PCTL_NOILP_ON_WAIT); |
324 | else if (sih->pmurev >= 2) | 324 | else if (ai_get_pmurev(sih) >= 2) |
325 | OR_REG(&cc->pmucontrol, PCTL_NOILP_ON_WAIT); | 325 | OR_REG(&cc->pmucontrol, PCTL_NOILP_ON_WAIT); |
326 | 326 | ||
327 | /* Return to original core */ | 327 | /* Return to original core */ |
@@ -358,7 +358,7 @@ void si_pmu_pll_init(struct si_pub *sih, uint xtalfreq) | |||
358 | origidx = ai_coreidx(sih); | 358 | origidx = ai_coreidx(sih); |
359 | cc = ai_setcoreidx(sih, SI_CC_IDX); | 359 | cc = ai_setcoreidx(sih, SI_CC_IDX); |
360 | 360 | ||
361 | switch (sih->chip) { | 361 | switch (ai_get_chip_id(sih)) { |
362 | case BCM4313_CHIP_ID: | 362 | case BCM4313_CHIP_ID: |
363 | case BCM43224_CHIP_ID: | 363 | case BCM43224_CHIP_ID: |
364 | case BCM43225_CHIP_ID: | 364 | case BCM43225_CHIP_ID: |
@@ -411,7 +411,7 @@ u32 si_pmu_measure_alpclk(struct si_pub *sih) | |||
411 | uint origidx; | 411 | uint origidx; |
412 | u32 alp_khz; | 412 | u32 alp_khz; |
413 | 413 | ||
414 | if (sih->pmurev < 10) | 414 | if (ai_get_pmurev(sih) < 10) |
415 | return 0; | 415 | return 0; |
416 | 416 | ||
417 | /* Remember original core before switch to chipc */ | 417 | /* Remember original core before switch to chipc */ |