Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-omap2 / clock.c
index 2191f25ad21b6f18153034e9de15aad273d2174b..0c38ca96c840ad596017b60f3d0801ae973a74c1 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/clk-provider.h>
 #include <linux/io.h>
 #include <linux/bitops.h>
-
+#include <linux/clk-private.h>
 #include <asm/cpu.h>
 
 
@@ -568,6 +568,21 @@ const struct clk_hw_omap_ops clkhwops_wait = {
        .find_companion = omap2_clk_dflt_find_companion,
 };
 
+/**
+ * omap_clocks_register - register an array of omap_clk
+ * @ocs: pointer to an array of omap_clk to register
+ */
+void __init omap_clocks_register(struct omap_clk oclks[], int cnt)
+{
+       struct omap_clk *c;
+
+       for (c = oclks; c < oclks + cnt; c++) {
+               clkdev_add(&c->lk);
+               if (!__clk_init(NULL, c->lk.clk))
+                       omap2_init_clk_hw_omap_clocks(c->lk.clk);
+       }
+}
+
 /**
  * omap2_clk_switch_mpurate_at_boot - switch ARM MPU rate by boot-time argument
  * @mpurate_ck_name: clk name of the clock to change rate