[AVR32] Put the chip in "stop" mode when halting the system
[pandora-kernel.git] / arch / avr32 / kernel / process.c
index 317dc50..0b43259 100644 (file)
@@ -38,6 +38,13 @@ void cpu_idle(void)
 
 void machine_halt(void)
 {
+       /*
+        * Enter Stop mode. The 32 kHz oscillator will keep running so
+        * the RTC will keep the time properly and the system will
+        * boot quickly.
+        */
+       asm volatile("sleep 3\n\t"
+                    "sub pc, -2");
 }
 
 void machine_power_off(void)