diff options
author | Hans-Christian Egtvedt <hcegtvedt@atmel.com> | 2007-02-26 13:50:43 +0100 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-04-27 13:44:12 +0200 |
commit | 19b7ce8bad718a2850ea19aeb7383f1728596c24 (patch) | |
tree | 1fef17c37eaf90231a497b92dd49565e56986b6c /arch/avr32/kernel/process.c | |
parent | 7760989e5e2900e484e9115e6e690c6ce0b0221c (diff) | |
download | blackbird-op-linux-19b7ce8bad718a2850ea19aeb7383f1728596c24.tar.gz blackbird-op-linux-19b7ce8bad718a2850ea19aeb7383f1728596c24.zip |
[AVR32] Put cpu in sleep 0 when idle.
This patch puts the CPU in sleep 0 when doing nothing, idle. This will
turn of the CPU clock and thus save power. The CPU is waken again when
an interrupt occurs.
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/kernel/process.c')
-rw-r--r-- | arch/avr32/kernel/process.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 0b4325946a41..4f8d2d474740 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c @@ -19,6 +19,8 @@ void (*pm_power_off)(void) = NULL; EXPORT_SYMBOL(pm_power_off); +extern void cpu_idle_sleep(void); + /* * This file handles the architecture-dependent parts of process handling.. */ @@ -27,9 +29,8 @@ void cpu_idle(void) { /* endless idle loop with no priority at all */ while (1) { - /* TODO: Enter sleep mode */ while (!need_resched()) - cpu_relax(); + cpu_idle_sleep(); preempt_enable_no_resched(); schedule(); preempt_disable(); |