diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-12-30 11:15:07 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-01-08 00:08:26 -0500 |
commit | 1ddda1cd235e05961bada337f87494272701c189 (patch) | |
tree | 244089a86431a7cf4c03628639b99b13de2ad860 /arch/arm/mach-highbank | |
parent | 9852910a0b0aa5548f990b51ad335921e0a710bf (diff) |
ARM: highbank: save and restore L2 cache and GIC on suspend
This fixes suspend to RAM adding necessary save and restore of L2 and GIC.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-highbank')
-rw-r--r-- | arch/arm/mach-highbank/pm.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index 0f4ffd6d47c4..04eddb4f4380 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c | |||
@@ -14,10 +14,12 @@ | |||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/cpu_pm.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <linux/suspend.h> | 20 | #include <linux/suspend.h> |
20 | 21 | ||
22 | #include <asm/cacheflush.h> | ||
21 | #include <asm/proc-fns.h> | 23 | #include <asm/proc-fns.h> |
22 | #include <asm/suspend.h> | 24 | #include <asm/suspend.h> |
23 | 25 | ||
@@ -26,16 +28,31 @@ | |||
26 | 28 | ||
27 | static int highbank_suspend_finish(unsigned long val) | 29 | static int highbank_suspend_finish(unsigned long val) |
28 | { | 30 | { |
31 | outer_flush_all(); | ||
32 | outer_disable(); | ||
33 | |||
34 | highbank_set_pwr_suspend(); | ||
35 | |||
29 | cpu_do_idle(); | 36 | cpu_do_idle(); |
37 | |||
38 | highbank_clear_pwr_request(); | ||
30 | return 0; | 39 | return 0; |
31 | } | 40 | } |
32 | 41 | ||
33 | static int highbank_pm_enter(suspend_state_t state) | 42 | static int highbank_pm_enter(suspend_state_t state) |
34 | { | 43 | { |
35 | highbank_set_pwr_suspend(); | 44 | cpu_pm_enter(); |
45 | cpu_cluster_pm_enter(); | ||
46 | |||
36 | highbank_set_cpu_jump(0, cpu_resume); | 47 | highbank_set_cpu_jump(0, cpu_resume); |
37 | cpu_suspend(0, highbank_suspend_finish); | 48 | cpu_suspend(0, highbank_suspend_finish); |
38 | 49 | ||
50 | cpu_cluster_pm_exit(); | ||
51 | cpu_pm_exit(); | ||
52 | |||
53 | highbank_smc1(0x102, 0x1); | ||
54 | if (scu_base_addr) | ||
55 | scu_enable(scu_base_addr); | ||
39 | return 0; | 56 | return 0; |
40 | } | 57 | } |
41 | 58 | ||