ARM: at91: implement the standby function for pm/cpuidle
[deliverable/linux.git] / arch / arm / mach-at91 / cpuidle.c
index a851e6c984218d14533fd5157c7e58fc76c5fc81..555d956b3a574b3a4d96be46c199c087d991080d 100644 (file)
@@ -39,20 +39,15 @@ static int at91_enter_idle(struct cpuidle_device *dev,
 {
        struct timeval before, after;
        int idle_time;
-       u32 saved_lpr;
 
        local_irq_disable();
        do_gettimeofday(&before);
        if (index == 0)
                /* Wait for interrupt state */
                cpu_do_idle();
-       else if (index == 1) {
-               asm("b 1f; .align 5; 1:");
-               asm("mcr p15, 0, r0, c7, c10, 4");      /* drain write buffer */
-               saved_lpr = sdram_selfrefresh_enable();
-               cpu_do_idle();
-               sdram_selfrefresh_disable(saved_lpr);
-       }
+       else if (index == 1)
+               at91_standby();
+
        do_gettimeofday(&after);
        local_irq_enable();
        idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
This page took 0.02739 seconds and 5 git commands to generate.