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 f420613cd395..b785994bab0a 100644 --- a/arch/arm/mach-w90x900/clock.c +++ b/arch/arm/mach-w90x900/clock.c | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #include "clock.h" | 26 | #include "clock.h" |
27 | 27 | ||
28 | #define SUBCLK 0x24 | ||
29 | |||
28 | static DEFINE_SPINLOCK(clocks_lock); | 30 | static DEFINE_SPINLOCK(clocks_lock); |
29 | 31 | ||
30 | int clk_enable(struct clk *clk) | 32 | int clk_enable(struct clk *clk) |
@@ -53,7 +55,13 @@ void clk_disable(struct clk *clk) | |||
53 | } | 55 | } |
54 | EXPORT_SYMBOL(clk_disable); | 56 | EXPORT_SYMBOL(clk_disable); |
55 | 57 | ||
56 | void w90x900_clk_enable(struct clk *clk, int enable) | 58 | unsigned long clk_get_rate(struct clk *clk) |
59 | { | ||
60 | return 15000000; | ||
61 | } | ||
62 | EXPORT_SYMBOL(clk_get_rate); | ||
63 | |||
64 | void nuc900_clk_enable(struct clk *clk, int enable) | ||
57 | { | 65 | { |
58 | unsigned int clocks = clk->cken; | 66 | unsigned int clocks = clk->cken; |
59 | unsigned long clken; | 67 | unsigned long clken; |
@@ -68,6 +76,22 @@ void w90x900_clk_enable(struct clk *clk, int enable) | |||
68 | __raw_writel(clken, W90X900_VA_CLKPWR); | 76 | __raw_writel(clken, W90X900_VA_CLKPWR); |
69 | } | 77 | } |
70 | 78 | ||
79 | void nuc900_subclk_enable(struct clk *clk, int enable) | ||
80 | { | ||
81 | unsigned int clocks = clk->cken; | ||
82 | unsigned long clken; | ||
83 | |||
84 | clken = __raw_readl(W90X900_VA_CLKPWR + SUBCLK); | ||
85 | |||
86 | if (enable) | ||
87 | clken |= clocks; | ||
88 | else | ||
89 | clken &= ~clocks; | ||
90 | |||
91 | __raw_writel(clken, W90X900_VA_CLKPWR + SUBCLK); | ||
92 | } | ||
93 | |||
94 | |||
71 | void clks_register(struct clk_lookup *clks, size_t num) | 95 | void clks_register(struct clk_lookup *clks, size_t num) |
72 | { | 96 | { |
73 | int i; | 97 | int i; |