summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm24xx.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-04-27 12:29:32 +0200
committerPaul Walmsley <paul@pwsan.com>2012-11-13 03:10:18 +0100
commited1ebc4948fdfe4c68865e5543b4a68e5a55973b (patch)
tree6d781e2833bdd91472f3a86e38eb4a8ae4e2b379 /arch/arm/mach-omap2/pm24xx.c
parentARM: OMAP3: clock: Convert to common clk (diff)
downloadlinux-ed1ebc4948fdfe4c68865e5543b4a68e5a55973b.tar.xz
linux-ed1ebc4948fdfe4c68865e5543b4a68e5a55973b.zip
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/pm24xx.c')
-rw-r--r--arch/arm/mach-omap2/pm24xx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 83815ddc4786..87ae36c7e155 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -25,7 +25,11 @@
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/delay.h>
+#ifdef CONFIG_COMMON_CLK
+#include <linux/clk-provider.h>
+#else
#include <linux/clk.h>
+#endif
#include <linux/irq.h>
#include <linux/time.h>
#include <linux/gpio.h>
@@ -202,7 +206,11 @@ static int omap2_can_sleep(void)
{
if (omap2_fclks_active())
return 0;
+#ifdef CONFIG_COMMON_CLK
+ if (__clk_is_enabled(osc_ck))
+#else
if (osc_ck->usecount > 1)
+#endif
return 0;
if (omap_dma_running())
return 0;