All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: linux-omap@vger.kernel.org
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: [PATCH 6/7][RFC] OMAP4: Clock hack since clock management framework not in.
Date: Tue, 21 Apr 2009 18:38:12 +0530	[thread overview]
Message-ID: <1240319293-19662-6-git-send-email-santosh.shilimkar@ti.com> (raw)
In-Reply-To: <1240319293-19662-5-git-send-email-santosh.shilimkar@ti.com>

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 <santosh.shilimkar@ti.com>
---
 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


  reply	other threads:[~2009-04-21 13:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21 13:08 [PATCH 1/7][RFC] OMAP4: Create architecture macros and config entries Santosh Shilimkar
2009-04-21 13:08 ` [PATCH 2/7][RFC] OMAP4: Create board support for OMAP_4430SDP Santosh Shilimkar
2009-04-21 13:08   ` [PATCH 3/7][RFC] OMAP4: Update common omap platform headers Santosh Shilimkar
2009-04-21 13:08     ` [PATCH 4/7][RFC] OMAP4: Update common omap platform common sources Santosh Shilimkar
2009-04-21 13:08       ` [PATCH 5/7][RFC] OMAP4: Update common omap machine specific sources Santosh Shilimkar
2009-04-21 13:08         ` Santosh Shilimkar [this message]
2009-04-21 13:08           ` [PATCH 7/7][RFC] OMAP4: Enable basic build support Santosh Shilimkar
2009-04-21 18:39             ` Tony Lindgren
2009-04-22  4:55               ` Shilimkar, Santosh
2009-04-22 19:04                 ` [PATCH] ARM: OMAP2/3: Reorganize Makefile to add omap4 support (Re: [PATCH 7/7][RFC] OMAP4: Enable basic build support.) Tony Lindgren
2009-04-23  5:07                   ` Shilimkar, Santosh
2009-04-23  6:21                     ` Tony Lindgren
2009-04-23  6:30                       ` Shilimkar, Santosh
2009-04-21 18:37           ` [PATCH 6/7][RFC] OMAP4: Clock hack since clock management framework not in Tony Lindgren
2009-04-21 13:24         ` [PATCH 5/7][RFC] OMAP4: Update common omap machine specific sources Dasgupta, Romit
2009-04-21 16:23         ` Kevin Hilman
2009-04-21 18:36         ` Tony Lindgren
2009-04-22  4:40           ` Shilimkar, Santosh
2009-04-21 13:21       ` [PATCH 4/7][RFC] OMAP4: Update common omap platform common sources Premi, Sanjeev
2009-04-21 13:34         ` Shilimkar, Santosh
2009-04-21 13:38           ` Shilimkar, Santosh
2009-04-21 18:33       ` Tony Lindgren
2009-04-21 18:26     ` [PATCH 3/7][RFC] OMAP4: Update common omap platform headers Tony Lindgren
2009-04-22  4:10       ` Shilimkar, Santosh
2009-04-22 19:11         ` Tony Lindgren
2009-04-23  5:17           ` Shilimkar, Santosh
2009-04-23  6:22             ` Tony Lindgren
2009-04-21 18:14   ` [PATCH 2/7][RFC] OMAP4: Create board support for OMAP_4430SDP Tony Lindgren
2009-04-22  4:47     ` Shilimkar, Santosh
2009-04-21 16:41 ` [PATCH 1/7][RFC] OMAP4: Create architecture macros and config entries Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240319293-19662-6-git-send-email-santosh.shilimkar@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.