This patch update the cooomon clock.c file for OMAP4. The clk_get() and
clk_put() sunctions are moved to  common place in arch/arm/common/clkdev.c
Since on current OMAP$ platform clk management is still not supported, the
internal file is hacked.
Once the framework is ready the CONFIG_CLKDEV will be used.

Signed-off-by: Santosh Shilimkar <[email protected]>
---
 arch/arm/plat-omap/clock.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 2e06145..7eb96a0 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -36,10 +36,30 @@ static struct clk_functions *arch_clock;
  * Standard clock functions defined in include/linux/clk.h
  *-------------------------------------------------------------------------*/
 
+/* This functions is moved to arch/arm/common/clkdev.c. For OMAP4 since
+ * clock framework is not up , it is defined here to avoid rework in
+ * every driver */
+
+/* Dummy hooks only for OMAP4.For rest OMAPs, common clkdev is used */
+#if defined(CONFIG_ARCH_OMAP4)
+struct clk *clk_get(struct device *dev, const char *id)
+{
+       return 0;
+}
+EXPORT_SYMBOL(clk_get);
+
+void clk_put(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_put);
+#endif
 int clk_enable(struct clk *clk)
 {
        unsigned long flags;
        int ret = 0;
+       if (cpu_is_omap44xx())
+               /* OMAP4 clk framework not supported yet */
+               return 0;
 
        if (clk == NULL || IS_ERR(clk))
                return -EINVAL;
@@ -56,6 +76,9 @@ EXPORT_SYMBOL(clk_enable);
 void clk_disable(struct clk *clk)
 {
        unsigned long flags;
+       if (cpu_is_omap44xx())
+               /* OMAP4 clk framework not supported yet */
+               return ;
 
        if (clk == NULL || IS_ERR(clk))
                return;
@@ -80,6 +103,9 @@ unsigned long clk_get_rate(struct clk *clk)
 {
        unsigned long flags;
        unsigned long ret = 0;
+       if (cpu_is_omap44xx())
+               /* OMAP4 clk framework not supported yet */
+               return 0;
 
        if (clk == NULL || IS_ERR(clk))
                return 0;
-- 
1.5.4.7

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to