]>
Commit | Line | Data |
---|---|---|
9d704c04 SI |
1 | /* |
2 | * Copyright (C) STMicroelectronics 2009 | |
3 | * Copyright (C) ST-Ericsson SA 2010 | |
4 | * | |
5 | * License Terms: GNU General Public License v2 | |
6 | * Based on ARM realview platform | |
7 | * | |
8 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> | |
9 | * | |
10 | */ | |
11 | #include <linux/kernel.h> | |
12 | #include <linux/errno.h> | |
13 | #include <linux/smp.h> | |
9d704c04 SI |
14 | |
15 | #include <asm/cacheflush.h> | |
eb50439b | 16 | #include <asm/smp_plat.h> |
9d704c04 | 17 | |
5ac21a94 MZ |
18 | #include <mach/setup.h> |
19 | ||
5ac21a94 MZ |
20 | /* |
21 | * platform-specific code to shutdown a CPU | |
22 | * | |
23 | * Called with IRQs disabled | |
24 | */ | |
25 | void __ref ux500_cpu_die(unsigned int cpu) | |
9d704c04 SI |
26 | { |
27 | flush_cache_all(); | |
28 | ||
5ac21a94 | 29 | /* directly enter low power state, skipping secure registers */ |
9d704c04 SI |
30 | for (;;) { |
31 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" | |
32 | : : : "memory"); | |
28763487 | 33 | if (pen_release == cpu_logical_map(cpu)) { |
9d704c04 SI |
34 | /* |
35 | * OK, proper wakeup, we're done | |
36 | */ | |
37 | break; | |
38 | } | |
39 | } | |
40 | } |