diff options
Diffstat (limited to 'arch/arm/mach-at91/cpuidle.c')
-rw-r--r-- | arch/arm/mach-at91/cpuidle.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index a851e6c98421..555d956b3a57 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c | |||
@@ -39,20 +39,15 @@ static int at91_enter_idle(struct cpuidle_device *dev, | |||
39 | { | 39 | { |
40 | struct timeval before, after; | 40 | struct timeval before, after; |
41 | int idle_time; | 41 | int idle_time; |
42 | u32 saved_lpr; | ||
43 | 42 | ||
44 | local_irq_disable(); | 43 | local_irq_disable(); |
45 | do_gettimeofday(&before); | 44 | do_gettimeofday(&before); |
46 | if (index == 0) | 45 | if (index == 0) |
47 | /* Wait for interrupt state */ | 46 | /* Wait for interrupt state */ |
48 | cpu_do_idle(); | 47 | cpu_do_idle(); |
49 | else if (index == 1) { | 48 | else if (index == 1) |
50 | asm("b 1f; .align 5; 1:"); | 49 | at91_standby(); |
51 | asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */ | 50 | |
52 | saved_lpr = sdram_selfrefresh_enable(); | ||
53 | cpu_do_idle(); | ||
54 | sdram_selfrefresh_disable(saved_lpr); | ||
55 | } | ||
56 | do_gettimeofday(&after); | 51 | do_gettimeofday(&after); |
57 | local_irq_enable(); | 52 | local_irq_enable(); |
58 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | 53 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + |