aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-12-04 06:01:36 -0500
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2006-12-08 07:06:23 -0500
commitc2eb5090ee531a50533ba9e739071c21f98a5a77 (patch)
tree921853eb78d2a2ab581fd989c3b3615948ad8a65 /arch
parent01cb087e747538d6a831c3ab370a1e1fd4538d5c (diff)
[AVR32] Put the chip in "stop" mode when halting the system
Make machine_halt() execute a sleep instruction to put the chip in "stop" mode when the system is halted. This switches off all clocks except the 32 kHz oscillator, which is needed for the RTC to keep ticking. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/avr32/kernel/process.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 317dc50945f2..0b4325946a41 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -38,6 +38,13 @@ void cpu_idle(void)
38 38
39void machine_halt(void) 39void machine_halt(void)
40{ 40{
41 /*
42 * Enter Stop mode. The 32 kHz oscillator will keep running so
43 * the RTC will keep the time properly and the system will
44 * boot quickly.
45 */
46 asm volatile("sleep 3\n\t"
47 "sub pc, -2");
41} 48}
42 49
43void machine_power_off(void) 50void machine_power_off(void)