aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos/pm.c')
-rw-r--r--arch/arm/mach-exynos/pm.c67
1 files changed, 1 insertions, 66 deletions
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 67d383de614f..6ab68a068e93 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -35,6 +35,7 @@
35 35
36#include "common.h" 36#include "common.h"
37#include "regs-pmu.h" 37#include "regs-pmu.h"
38#include "regs-sys.h"
38 39
39/** 40/**
40 * struct exynos_wkup_irq - Exynos GIC to PMU IRQ mapping 41 * struct exynos_wkup_irq - Exynos GIC to PMU IRQ mapping
@@ -100,72 +101,6 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
100 return -ENOENT; 101 return -ENOENT;
101} 102}
102 103
103/**
104 * exynos_core_power_down : power down the specified cpu
105 * @cpu : the cpu to power down
106 *
107 * Power down the specified cpu. The sequence must be finished by a
108 * call to cpu_do_idle()
109 *
110 */
111void exynos_cpu_power_down(int cpu)
112{
113 __raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
114}
115
116/**
117 * exynos_cpu_power_up : power up the specified cpu
118 * @cpu : the cpu to power up
119 *
120 * Power up the specified cpu
121 */
122void exynos_cpu_power_up(int cpu)
123{
124 __raw_writel(S5P_CORE_LOCAL_PWR_EN,
125 EXYNOS_ARM_CORE_CONFIGURATION(cpu));
126}
127
128/**
129 * exynos_cpu_power_state : returns the power state of the cpu
130 * @cpu : the cpu to retrieve the power state from
131 *
132 */
133int exynos_cpu_power_state(int cpu)
134{
135 return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) &
136 S5P_CORE_LOCAL_PWR_EN);
137}
138
139/**
140 * exynos_cluster_power_down : power down the specified cluster
141 * @cluster : the cluster to power down
142 */
143void exynos_cluster_power_down(int cluster)
144{
145 __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
146}
147
148/**
149 * exynos_cluster_power_up : power up the specified cluster
150 * @cluster : the cluster to power up
151 */
152void exynos_cluster_power_up(int cluster)
153{
154 __raw_writel(S5P_CORE_LOCAL_PWR_EN,
155 EXYNOS_COMMON_CONFIGURATION(cluster));
156}
157
158/**
159 * exynos_cluster_power_state : returns the power state of the cluster
160 * @cluster : the cluster to retrieve the power state from
161 *
162 */
163int exynos_cluster_power_state(int cluster)
164{
165 return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) &
166 S5P_CORE_LOCAL_PWR_EN);
167}
168
169#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ 104#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
170 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ 105 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
171 (sysram_base_addr + 0x24) : S5P_INFORM0)) 106 (sysram_base_addr + 0x24) : S5P_INFORM0))