All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tarun Kanti DebBarma <tarun.kanti@ti.com>
To: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Tarun Kanti DebBarma <tarun.kanti@ti.com>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	Paul Walmsley <paul@pwsan.com>, Tony Lindgren <tony@atomide.com>,
	Kevin Hilman <khilman@ti.com>, Rajendra Nayak <rnayak@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
Date: Fri, 20 Apr 2012 18:09:21 +0530	[thread overview]
Message-ID: <1334925563-20768-3-git-send-email-tarun.kanti@ti.com> (raw)
In-Reply-To: <1334925563-20768-1-git-send-email-tarun.kanti@ti.com>

Add an API to get main clock name associated with a given @oh.
This will avoid the need to construct fclk names during early
initialization in order to get fclk handle using clk_get().

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   15 +++++++++++++++
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2c27fdb..2c6214d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2775,3 +2775,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
 
 	return 0;
 }
+
+/**
+ * omap_hwmod_get_main_clk - get pointer to main clock name
+ * @oh: struct omap_hwmod *
+ *
+ * Returns the main clock name assocated with @oh upon success,
+ * or NULL if @oh is NULL.
+ */
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
+{
+	if (!oh)
+		return NULL;
+
+	return oh->main_clk;
+}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 8070145..f3c0697 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -608,6 +608,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
 
 int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
 
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
+
 /*
  * Chip variant-specific hwmod init routines - XXX should be converted
  * to use initcalls once the initial boot ordering is straightened out
-- 
1.7.0.4


WARNING: multiple messages have this Message-ID (diff)
From: tarun.kanti@ti.com (Tarun Kanti DebBarma)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
Date: Fri, 20 Apr 2012 18:09:21 +0530	[thread overview]
Message-ID: <1334925563-20768-3-git-send-email-tarun.kanti@ti.com> (raw)
In-Reply-To: <1334925563-20768-1-git-send-email-tarun.kanti@ti.com>

Add an API to get main clock name associated with a given @oh.
This will avoid the need to construct fclk names during early
initialization in order to get fclk handle using clk_get().

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   15 +++++++++++++++
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2c27fdb..2c6214d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2775,3 +2775,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
 
 	return 0;
 }
+
+/**
+ * omap_hwmod_get_main_clk - get pointer to main clock name
+ * @oh: struct omap_hwmod *
+ *
+ * Returns the main clock name assocated with @oh upon success,
+ * or NULL if @oh is NULL.
+ */
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
+{
+	if (!oh)
+		return NULL;
+
+	return oh->main_clk;
+}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 8070145..f3c0697 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -608,6 +608,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
 
 int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
 
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
+
 /*
  * Chip variant-specific hwmod init routines - XXX should be converted
  * to use initcalls once the initial boot ordering is straightened out
-- 
1.7.0.4

  parent reply	other threads:[~2012-04-20 12:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 12:39 [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
2012-04-20 12:39 ` Tarun Kanti DebBarma
2012-04-20 12:39 ` [PATCH v2 1/4] ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-04-20 12:39 ` Tarun Kanti DebBarma [this message]
2012-04-20 12:39   ` [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API Tarun Kanti DebBarma
2012-04-20 15:10   ` Cousson, Benoit
2012-04-20 15:10     ` Cousson, Benoit
2012-06-18 16:23   ` Paul Walmsley
2012-06-18 16:23     ` Paul Walmsley
2012-07-04 15:39   ` Paul Walmsley
2012-07-04 15:39     ` Paul Walmsley
2012-04-20 12:39 ` [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-04-23 17:48   ` Kevin Hilman
2012-04-23 17:48     ` Kevin Hilman
2012-04-23 19:36     ` DebBarma, Tarun Kanti
2012-04-23 19:36       ` DebBarma, Tarun Kanti
2012-04-24  0:34       ` Kevin Hilman
2012-04-24  0:34         ` Kevin Hilman
2012-04-20 12:39 ` [PATCH v2 4/4] ARM: OMAP2+: dmtimer: cleanup fclk usage Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-06-14 10:54 ` [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage DebBarma, Tarun Kanti
2012-06-14 10:54   ` DebBarma, Tarun Kanti
2012-06-14 10:58   ` Shilimkar, Santosh
2012-06-14 10:58     ` Shilimkar, Santosh
2012-07-05  4:02     ` DebBarma, Tarun Kanti
2012-07-05  4:02       ` DebBarma, Tarun Kanti
2012-07-05  9:28       ` Tony Lindgren
2012-07-05  9:28         ` Tony Lindgren
2012-07-05 11:41         ` DebBarma, Tarun Kanti
2012-07-05 11:41           ` DebBarma, Tarun Kanti
2012-07-06  7:09           ` Tony Lindgren
2012-07-06  7:09             ` Tony Lindgren

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=1334925563-20768-3-git-send-email-tarun.kanti@ti.com \
    --to=tarun.kanti@ti.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.com \
    /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.