aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/cpuidle44xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/cpuidle44xx.c')
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index 288bee6cbb76..d639aef0deda 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -54,6 +54,8 @@ static struct clockdomain *cpu_clkdm[NR_CPUS];
54static atomic_t abort_barrier; 54static atomic_t abort_barrier;
55static bool cpu_done[NR_CPUS]; 55static bool cpu_done[NR_CPUS];
56 56
57/* Private functions */
58
57/** 59/**
58 * omap4_enter_idle_coupled_[simple/coupled] - OMAP4 cpuidle entry functions 60 * omap4_enter_idle_coupled_[simple/coupled] - OMAP4 cpuidle entry functions
59 * @dev: cpuidle device 61 * @dev: cpuidle device
@@ -161,9 +163,19 @@ fail:
161 return index; 163 return index;
162} 164}
163 165
164DEFINE_PER_CPU(struct cpuidle_device, omap4_idle_dev); 166/*
167 * For each cpu, setup the broadcast timer because local timers
168 * stops for the states above C1.
169 */
170static void omap_setup_broadcast_timer(void *arg)
171{
172 int cpu = smp_processor_id();
173 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
174}
175
176static DEFINE_PER_CPU(struct cpuidle_device, omap4_idle_dev);
165 177
166struct cpuidle_driver omap4_idle_driver = { 178static struct cpuidle_driver omap4_idle_driver = {
167 .name = "omap4_idle", 179 .name = "omap4_idle",
168 .owner = THIS_MODULE, 180 .owner = THIS_MODULE,
169 .en_core_tk_irqen = 1, 181 .en_core_tk_irqen = 1,
@@ -178,7 +190,7 @@ struct cpuidle_driver omap4_idle_driver = {
178 .desc = "MPUSS ON" 190 .desc = "MPUSS ON"
179 }, 191 },
180 { 192 {
181 /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */ 193 /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
182 .exit_latency = 328 + 440, 194 .exit_latency = 328 + 440,
183 .target_residency = 960, 195 .target_residency = 960,
184 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED, 196 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
@@ -200,15 +212,7 @@ struct cpuidle_driver omap4_idle_driver = {
200 .safe_state_index = 0, 212 .safe_state_index = 0,
201}; 213};
202 214
203/* 215/* Public functions */
204 * For each cpu, setup the broadcast timer because local timers
205 * stops for the states above C1.
206 */
207static void omap_setup_broadcast_timer(void *arg)
208{
209 int cpu = smp_processor_id();
210 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
211}
212 216
213/** 217/**
214 * omap4_idle_init - Init routine for OMAP4 idle 218 * omap4_idle_init - Init routine for OMAP4 idle