diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-09-16 06:33:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-19 16:10:11 -0400 |
commit | 3861b2c5d90b219ee772b5a1d1a32ee630564121 (patch) | |
tree | 695674bb297eadac2a8b4afa4c463b61b3e05800 /drivers/bcma | |
parent | 7cc44ed48d0ec0937c1f098642540b6c9ca38de5 (diff) |
bcma: cc: export more control functions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/driver_chipcommon_pmu.c | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c index 4bc10aa57bd4..2968d809d49f 100644 --- a/drivers/bcma/driver_chipcommon_pmu.c +++ b/drivers/bcma/driver_chipcommon_pmu.c | |||
@@ -18,20 +18,40 @@ static u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset) | |||
18 | return bcma_cc_read32(cc, BCMA_CC_PLLCTL_DATA); | 18 | return bcma_cc_read32(cc, BCMA_CC_PLLCTL_DATA); |
19 | } | 19 | } |
20 | 20 | ||
21 | static void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc, | 21 | void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, u32 value) |
22 | u32 offset, u32 mask, u32 set) | ||
23 | { | 22 | { |
24 | u32 value; | 23 | bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset); |
24 | bcma_cc_read32(cc, BCMA_CC_PLLCTL_ADDR); | ||
25 | bcma_cc_write32(cc, BCMA_CC_PLLCTL_DATA, value); | ||
26 | } | ||
27 | EXPORT_SYMBOL_GPL(bcma_chipco_pll_write); | ||
25 | 28 | ||
26 | bcma_cc_read32(cc, BCMA_CC_CHIPCTL_ADDR); | 29 | void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset, u32 mask, |
30 | u32 set) | ||
31 | { | ||
32 | bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset); | ||
33 | bcma_cc_read32(cc, BCMA_CC_PLLCTL_ADDR); | ||
34 | bcma_cc_maskset32(cc, BCMA_CC_PLLCTL_DATA, mask, set); | ||
35 | } | ||
36 | EXPORT_SYMBOL_GPL(bcma_chipco_pll_maskset); | ||
37 | |||
38 | void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc, | ||
39 | u32 offset, u32 mask, u32 set) | ||
40 | { | ||
27 | bcma_cc_write32(cc, BCMA_CC_CHIPCTL_ADDR, offset); | 41 | bcma_cc_write32(cc, BCMA_CC_CHIPCTL_ADDR, offset); |
28 | bcma_cc_read32(cc, BCMA_CC_CHIPCTL_ADDR); | 42 | bcma_cc_read32(cc, BCMA_CC_CHIPCTL_ADDR); |
29 | value = bcma_cc_read32(cc, BCMA_CC_CHIPCTL_DATA); | 43 | bcma_cc_maskset32(cc, BCMA_CC_CHIPCTL_DATA, mask, set); |
30 | value &= mask; | 44 | } |
31 | value |= set; | 45 | EXPORT_SYMBOL_GPL(bcma_chipco_chipctl_maskset); |
32 | bcma_cc_write32(cc, BCMA_CC_CHIPCTL_DATA, value); | 46 | |
33 | bcma_cc_read32(cc, BCMA_CC_CHIPCTL_DATA); | 47 | void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, u32 offset, u32 mask, |
48 | u32 set) | ||
49 | { | ||
50 | bcma_cc_write32(cc, BCMA_CC_REGCTL_ADDR, offset); | ||
51 | bcma_cc_read32(cc, BCMA_CC_REGCTL_ADDR); | ||
52 | bcma_cc_maskset32(cc, BCMA_CC_REGCTL_DATA, mask, set); | ||
34 | } | 53 | } |
54 | EXPORT_SYMBOL_GPL(bcma_chipco_regctl_maskset); | ||
35 | 55 | ||
36 | static void bcma_pmu_pll_init(struct bcma_drv_cc *cc) | 56 | static void bcma_pmu_pll_init(struct bcma_drv_cc *cc) |
37 | { | 57 | { |