diff options
author | wanzongshun <mcuos.com@gmail.com> | 2009-07-14 15:10:43 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-17 13:38:17 +0100 |
commit | db58e90fdbe9d12b431ae8d8e856961ce75d74f0 (patch) | |
tree | 3367a0abc6e955ecb16cbc8f33873a015b70230c /arch/arm/mach-w90x900/clock.c | |
parent | d2c241955095b129459985a8c02d85b70984b945 (diff) |
[ARM] 5602/1: Add sub clock api for w90p910 platform
Add sub clock api for w90p910 platform.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-w90x900/clock.c')
-rw-r--r-- | arch/arm/mach-w90x900/clock.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-w90x900/clock.c b/arch/arm/mach-w90x900/clock.c index f420613cd39..49cf1fbc14e 100644 --- a/arch/arm/mach-w90x900/clock.c +++ b/arch/arm/mach-w90x900/clock.c @@ -25,6 +25,8 @@ #include "clock.h" +#define SUBCLK 0x24 + static DEFINE_SPINLOCK(clocks_lock); int clk_enable(struct clk *clk) @@ -68,6 +70,22 @@ void w90x900_clk_enable(struct clk *clk, int enable) __raw_writel(clken, W90X900_VA_CLKPWR); } +void w90x900_subclk_enable(struct clk *clk, int enable) +{ + unsigned int clocks = clk->cken; + unsigned long clken; + + clken = __raw_readl(W90X900_VA_CLKPWR + SUBCLK); + + if (enable) + clken |= clocks; + else + clken &= ~clocks; + + __raw_writel(clken, W90X900_VA_CLKPWR + SUBCLK); +} + + void clks_register(struct clk_lookup *clks, size_t num) { int i; |