diff options
Diffstat (limited to 'arch/arm/mach-exynos/platsmp.c')
-rw-r--r-- | arch/arm/mach-exynos/platsmp.c | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 70d1e65a51d8..e5a8d764f24c 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/platsmp.c | 1 | /* |
2 | * | ||
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | 2 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. |
4 | * http://www.samsung.com | 3 | * http://www.samsung.com |
5 | * | 4 | * |
@@ -32,6 +31,72 @@ | |||
32 | 31 | ||
33 | extern void exynos4_secondary_startup(void); | 32 | extern void exynos4_secondary_startup(void); |
34 | 33 | ||
34 | /** | ||
35 | * exynos_core_power_down : power down the specified cpu | ||
36 | * @cpu : the cpu to power down | ||
37 | * | ||
38 | * Power down the specified cpu. The sequence must be finished by a | ||
39 | * call to cpu_do_idle() | ||
40 | * | ||
41 | */ | ||
42 | void exynos_cpu_power_down(int cpu) | ||
43 | { | ||
44 | __raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * exynos_cpu_power_up : power up the specified cpu | ||
49 | * @cpu : the cpu to power up | ||
50 | * | ||
51 | * Power up the specified cpu | ||
52 | */ | ||
53 | void exynos_cpu_power_up(int cpu) | ||
54 | { | ||
55 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | ||
56 | EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * exynos_cpu_power_state : returns the power state of the cpu | ||
61 | * @cpu : the cpu to retrieve the power state from | ||
62 | * | ||
63 | */ | ||
64 | int exynos_cpu_power_state(int cpu) | ||
65 | { | ||
66 | return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) & | ||
67 | S5P_CORE_LOCAL_PWR_EN); | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * exynos_cluster_power_down : power down the specified cluster | ||
72 | * @cluster : the cluster to power down | ||
73 | */ | ||
74 | void exynos_cluster_power_down(int cluster) | ||
75 | { | ||
76 | __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster)); | ||
77 | } | ||
78 | |||
79 | /** | ||
80 | * exynos_cluster_power_up : power up the specified cluster | ||
81 | * @cluster : the cluster to power up | ||
82 | */ | ||
83 | void exynos_cluster_power_up(int cluster) | ||
84 | { | ||
85 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | ||
86 | EXYNOS_COMMON_CONFIGURATION(cluster)); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * exynos_cluster_power_state : returns the power state of the cluster | ||
91 | * @cluster : the cluster to retrieve the power state from | ||
92 | * | ||
93 | */ | ||
94 | int exynos_cluster_power_state(int cluster) | ||
95 | { | ||
96 | return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) & | ||
97 | S5P_CORE_LOCAL_PWR_EN); | ||
98 | } | ||
99 | |||
35 | static inline void __iomem *cpu_boot_reg_base(void) | 100 | static inline void __iomem *cpu_boot_reg_base(void) |
36 | { | 101 | { |
37 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) | 102 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) |