Merge branch 'devel' into next
[pandora-kernel.git] / arch / arm / mach-ep93xx / clock.c
index 08ad782..f62c355 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/clk.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/string.h>
 #include <asm/div64.h>
 #include <asm/hardware.h>
@@ -26,6 +27,10 @@ struct clk {
        u32             enable_mask;
 };
 
+static struct clk clk_uart = {
+       .name           = "UARTCLK",
+       .rate           = 14745600,
+};
 static struct clk clk_pll1 = {
        .name           = "pll1",
 };
@@ -49,6 +54,7 @@ static struct clk clk_usb_host = {
 
 
 static struct clk *clocks[] = {
+       &clk_uart,
        &clk_pll1,
        &clk_f,
        &clk_h,
@@ -68,6 +74,7 @@ struct clk *clk_get(struct device *dev, const char *id)
 
        return ERR_PTR(-ENOENT);
 }
+EXPORT_SYMBOL(clk_get);
 
 int clk_enable(struct clk *clk)
 {
@@ -80,6 +87,7 @@ int clk_enable(struct clk *clk)
 
        return 0;
 }
+EXPORT_SYMBOL(clk_enable);
 
 void clk_disable(struct clk *clk)
 {
@@ -90,15 +98,18 @@ void clk_disable(struct clk *clk)
                __raw_writel(value & ~clk->enable_mask, clk->enable_reg);
        }
 }
+EXPORT_SYMBOL(clk_disable);
 
 unsigned long clk_get_rate(struct clk *clk)
 {
        return clk->rate;
 }
+EXPORT_SYMBOL(clk_get_rate);
 
 void clk_put(struct clk *clk)
 {
 }
+EXPORT_SYMBOL(clk_put);
 
 
 
@@ -124,7 +135,7 @@ static unsigned long calc_pll_rate(u32 config_word)
        return (unsigned long)rate;
 }
 
-void ep93xx_clock_init(void)
+static int __init ep93xx_clock_init(void)
 {
        u32 value;
 
@@ -153,4 +164,7 @@ void ep93xx_clock_init(void)
        printk(KERN_INFO "ep93xx: FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n",
                clk_f.rate / 1000000, clk_h.rate / 1000000,
                clk_p.rate / 1000000);
+
+       return 0;
 }
+arch_initcall(ep93xx_clock_init);