summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clkt2xxx_sys.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-04-27 15:59:32 +0530
committerPaul Walmsley <paul@pwsan.com>2012-11-12 19:10:18 -0700
commited1ebc4948fdfe4c68865e5543b4a68e5a55973b (patch)
tree6d781e2833bdd91472f3a86e38eb4a8ae4e2b379 /arch/arm/mach-omap2/clkt2xxx_sys.c
parentb4777a21381fd1f87be8c606a616b7f97f485d2b (diff)
ARM: OMAP2: clock: Convert to common clk
Convert all OMAP2 specific platform files to use COMMON clk and keep all the changes under the CONFIG_COMMON_CLK macro check so it does not break any existing code. At a later point switch to COMMON clk and get rid of all old/legacy code. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mike Turquette <mturquette@ti.com> [paul@pwsan.com: updated to apply] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clkt2xxx_sys.c')
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_sys.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clkt2xxx_sys.c b/arch/arm/mach-omap2/clkt2xxx_sys.c
index 46683b3c246..e6e73cf6aa9 100644
--- a/arch/arm/mach-omap2/clkt2xxx_sys.c
+++ b/arch/arm/mach-omap2/clkt2xxx_sys.c
@@ -40,9 +40,16 @@ u32 omap2xxx_get_sysclkdiv(void)
return div;
}
+#ifdef CONFIG_COMMON_CLK
+unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
+ unsigned long parent_rate)
+{
+ return parent_rate / omap2xxx_get_sysclkdiv();
+}
+#else
unsigned long omap2xxx_sys_clk_recalc(struct clk *clk)
{
return clk->parent->rate / omap2xxx_get_sysclkdiv();
}
-
+#endif