ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
authorTarun Kanti DebBarma <tarun.kanti@ti.com>
Wed, 4 Jul 2012 11:00:48 +0000 (05:00 -0600)
committerPaul Walmsley <paul@pwsan.com>
Wed, 4 Jul 2012 11:00:48 +0000 (05:00 -0600)
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>
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/plat-omap/include/plat/omap_hwmod.h

index 773193670ea265cefa67f938fa780e938400dbce..a89214ee4694772c99de98db56321472c24fe656 100644 (file)
@@ -3401,3 +3401,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;
+}
index c835b7194ff57ba71d5448746ea21e6134e39ef7..da22acd0ce7aefb5729b1347fd75f50d825a9878 100644 (file)
@@ -629,6 +629,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
This page took 0.028789 seconds and 5 git commands to generate.