diff options
Diffstat (limited to 'arch/arm/mach-w90x900/clock.c')
-rw-r--r-- | arch/arm/mach-w90x900/clock.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/arm/mach-w90x900/clock.c b/arch/arm/mach-w90x900/clock.c index f420613cd39..b785994bab0 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) @@ -53,7 +55,13 @@ void clk_disable(struct clk *clk) } EXPORT_SYMBOL(clk_disable); -void w90x900_clk_enable(struct clk *clk, int enable) +unsigned long clk_get_rate(struct clk *clk) +{ + return 15000000; +} +EXPORT_SYMBOL(clk_get_rate); + +void nuc900_clk_enable(struct clk *clk, int enable) { unsigned int clocks = clk->cken; unsigned long clken; @@ -68,6 +76,22 @@ void w90x900_clk_enable(struct clk *clk, int enable) __raw_writel(clken, W90X900_VA_CLKPWR); } +void nuc900_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; |