diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 18:25:41 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 18:25:41 -0400 |
commit | 3e965b176341b78620f7404fd8b7f9a0d061f8a2 (patch) | |
tree | a2dbf06d6ae20fbe417b70f0a471cc4f93ff0a71 /arch/arm/mach-mx5 | |
parent | 034ee299122c6b145d6d3cafb9ef5c329a4ab990 (diff) | |
parent | 5839fec9d8db35b2b07359b18a77295418e239ad (diff) |
Merge branch 'next/fixes' into next/cleanup
Conflicts:
arch/arm/mach-mxs/include/mach/gpio.h
arch/arm/plat-mxc/include/mach/gpio.h
drivers/video/omap/lcd_apollon.c
drivers/video/omap/lcd_ldp.c
drivers/video/omap/lcd_overo.c
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/pm-imx5.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c index 0624fb8edffb..98052fc852c7 100644 --- a/arch/arm/mach-mx5/pm-imx5.c +++ b/arch/arm/mach-mx5/pm-imx5.c | |||
@@ -20,9 +20,13 @@ | |||
20 | 20 | ||
21 | static struct clk *gpc_dvfs_clk; | 21 | static struct clk *gpc_dvfs_clk; |
22 | 22 | ||
23 | static int mx5_suspend_prepare(void) | ||
24 | { | ||
25 | return clk_enable(gpc_dvfs_clk); | ||
26 | } | ||
27 | |||
23 | static int mx5_suspend_enter(suspend_state_t state) | 28 | static int mx5_suspend_enter(suspend_state_t state) |
24 | { | 29 | { |
25 | clk_enable(gpc_dvfs_clk); | ||
26 | switch (state) { | 30 | switch (state) { |
27 | case PM_SUSPEND_MEM: | 31 | case PM_SUSPEND_MEM: |
28 | mx5_cpu_lp_set(STOP_POWER_OFF); | 32 | mx5_cpu_lp_set(STOP_POWER_OFF); |
@@ -43,11 +47,14 @@ static int mx5_suspend_enter(suspend_state_t state) | |||
43 | __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); | 47 | __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); |
44 | } | 48 | } |
45 | cpu_do_idle(); | 49 | cpu_do_idle(); |
46 | clk_disable(gpc_dvfs_clk); | ||
47 | |||
48 | return 0; | 50 | return 0; |
49 | } | 51 | } |
50 | 52 | ||
53 | static void mx5_suspend_finish(void) | ||
54 | { | ||
55 | clk_disable(gpc_dvfs_clk); | ||
56 | } | ||
57 | |||
51 | static int mx5_pm_valid(suspend_state_t state) | 58 | static int mx5_pm_valid(suspend_state_t state) |
52 | { | 59 | { |
53 | return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX); | 60 | return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX); |
@@ -55,7 +62,9 @@ static int mx5_pm_valid(suspend_state_t state) | |||
55 | 62 | ||
56 | static const struct platform_suspend_ops mx5_suspend_ops = { | 63 | static const struct platform_suspend_ops mx5_suspend_ops = { |
57 | .valid = mx5_pm_valid, | 64 | .valid = mx5_pm_valid, |
65 | .prepare = mx5_suspend_prepare, | ||
58 | .enter = mx5_suspend_enter, | 66 | .enter = mx5_suspend_enter, |
67 | .finish = mx5_suspend_finish, | ||
59 | }; | 68 | }; |
60 | 69 | ||
61 | static int __init mx5_pm_init(void) | 70 | static int __init mx5_pm_init(void) |