[ARM] pxa: add apmu clock support in mmp
authorHaojian Zhuang <haojian.zhuang@marvell.com>
Thu, 10 Sep 2009 06:01:22 +0000 (14:01 +0800)
committerEric Miao <eric.y.miao@gmail.com>
Tue, 1 Dec 2009 01:02:51 +0000 (09:02 +0800)
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
arch/arm/mach-mmp/clock.c
arch/arm/mach-mmp/clock.h

index 2d9cc5a7122fad0cb167f1a569073e0ece95e3fb..2a46ed5cc2a297e0356529b7465e0a8c52a06231 100644 (file)
@@ -34,6 +34,21 @@ struct clkops apbc_clk_ops = {
        .disable        = apbc_clk_disable,
 };
 
+static void apmu_clk_enable(struct clk *clk)
+{
+       __raw_writel(clk->enable_val, clk->clk_rst);
+}
+
+static void apmu_clk_disable(struct clk *clk)
+{
+       __raw_writel(0, clk->clk_rst);
+}
+
+struct clkops apmu_clk_ops = {
+       .enable         = apmu_clk_enable,
+       .disable        = apmu_clk_disable,
+};
+
 static DEFINE_SPINLOCK(clocks_lock);
 
 int clk_enable(struct clk *clk)
index ed967e78e6a82eaa880c1ebf2db3a2ee9defde7a..eefffbe683b0263e4c053833b7f1025b3ed83f27 100644 (file)
@@ -25,6 +25,7 @@ struct clk {
 };
 
 extern struct clkops apbc_clk_ops;
+extern struct clkops apmu_clk_ops;
 
 #define APBC_CLK(_name, _reg, _fnclksel, _rate)                        \
 struct clk clk_##_name = {                                     \