aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-w90x900/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-w90x900/clock.c')
-rw-r--r--arch/arm/mach-w90x900/clock.c26
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
28static DEFINE_SPINLOCK(clocks_lock); 30static DEFINE_SPINLOCK(clocks_lock);
29 31
30int clk_enable(struct clk *clk) 32int clk_enable(struct clk *clk)
@@ -53,7 +55,13 @@ void clk_disable(struct clk *clk)
53} 55}
54EXPORT_SYMBOL(clk_disable); 56EXPORT_SYMBOL(clk_disable);
55 57
56void w90x900_clk_enable(struct clk *clk, int enable) 58unsigned long clk_get_rate(struct clk *clk)
59{
60 return 15000000;
61}
62EXPORT_SYMBOL(clk_get_rate);
63
64void 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
79void 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
71void clks_register(struct clk_lookup *clks, size_t num) 95void clks_register(struct clk_lookup *clks, size_t num)
72{ 96{
73 int i; 97 int i;