aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTarun Kanti DebBarma <tarun.kanti@ti.com>2012-07-04 07:00:48 -0400
committerPaul Walmsley <paul@pwsan.com>2012-07-04 07:00:48 -0400
commitbed9d1bb4ed8c9bdaca77d31a2562c3a9dae43a7 (patch)
treea773eb2abfae2b3fadd5a777182cfcb36ea3bdb9 /arch/arm
parent55ffe163c8b4e2aa0a083000e02ec26efd71ea63 (diff)
ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
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(). Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Cc: Benoit Cousson <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> Acked-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c15
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h2
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 773193670ea2..a89214ee4694 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3401,3 +3401,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
3401 3401
3402 return 0; 3402 return 0;
3403} 3403}
3404
3405/**
3406 * omap_hwmod_get_main_clk - get pointer to main clock name
3407 * @oh: struct omap_hwmod *
3408 *
3409 * Returns the main clock name assocated with @oh upon success,
3410 * or NULL if @oh is NULL.
3411 */
3412const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
3413{
3414 if (!oh)
3415 return NULL;
3416
3417 return oh->main_clk;
3418}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index c835b7194ff5..da22acd0ce7a 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -629,6 +629,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
629 629
630int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx); 630int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
631 631
632const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
633
632/* 634/*
633 * Chip variant-specific hwmod init routines - XXX should be converted 635 * Chip variant-specific hwmod init routines - XXX should be converted
634 * to use initcalls once the initial boot ordering is straightened out 636 * to use initcalls once the initial boot ordering is straightened out