diff options
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/clock.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mmp/clock.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c index 2d9cc5a7122f..2a46ed5cc2a2 100644 --- a/arch/arm/mach-mmp/clock.c +++ b/arch/arm/mach-mmp/clock.c | |||
@@ -34,6 +34,21 @@ struct clkops apbc_clk_ops = { | |||
34 | .disable = apbc_clk_disable, | 34 | .disable = apbc_clk_disable, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static void apmu_clk_enable(struct clk *clk) | ||
38 | { | ||
39 | __raw_writel(clk->enable_val, clk->clk_rst); | ||
40 | } | ||
41 | |||
42 | static void apmu_clk_disable(struct clk *clk) | ||
43 | { | ||
44 | __raw_writel(0, clk->clk_rst); | ||
45 | } | ||
46 | |||
47 | struct clkops apmu_clk_ops = { | ||
48 | .enable = apmu_clk_enable, | ||
49 | .disable = apmu_clk_disable, | ||
50 | }; | ||
51 | |||
37 | static DEFINE_SPINLOCK(clocks_lock); | 52 | static DEFINE_SPINLOCK(clocks_lock); |
38 | 53 | ||
39 | int clk_enable(struct clk *clk) | 54 | int clk_enable(struct clk *clk) |
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h index ed967e78e6a8..eefffbe683b0 100644 --- a/arch/arm/mach-mmp/clock.h +++ b/arch/arm/mach-mmp/clock.h | |||
@@ -25,6 +25,7 @@ struct clk { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern struct clkops apbc_clk_ops; | 27 | extern struct clkops apbc_clk_ops; |
28 | extern struct clkops apmu_clk_ops; | ||
28 | 29 | ||
29 | #define APBC_CLK(_name, _reg, _fnclksel, _rate) \ | 30 | #define APBC_CLK(_name, _reg, _fnclksel, _rate) \ |
30 | struct clk clk_##_name = { \ | 31 | struct clk clk_##_name = { \ |