diff options
author | Hans-Christian Egtvedt <hcegtvedt@atmel.com> | 2007-02-26 07:50:43 -0500 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-04-27 07:44:12 -0400 |
commit | 19b7ce8bad718a2850ea19aeb7383f1728596c24 (patch) | |
tree | 1fef17c37eaf90231a497b92dd49565e56986b6c /include/asm-avr32 | |
parent | 7760989e5e2900e484e9115e6e690c6ce0b0221c (diff) |
[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 'include/asm-avr32')
-rw-r--r-- | include/asm-avr32/thread_info.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-avr32/thread_info.h b/include/asm-avr32/thread_info.h index d1f5b35ebd54..a2e606dd4f4a 100644 --- a/include/asm-avr32/thread_info.h +++ b/include/asm-avr32/thread_info.h | |||
@@ -83,6 +83,7 @@ static inline struct thread_info *current_thread_info(void) | |||
83 | #define TIF_SINGLE_STEP 6 /* single step after next break */ | 83 | #define TIF_SINGLE_STEP 6 /* single step after next break */ |
84 | #define TIF_MEMDIE 7 | 84 | #define TIF_MEMDIE 7 |
85 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal */ | 85 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal */ |
86 | #define TIF_CPU_GOING_TO_SLEEP 9 /* CPU is entering sleep 0 mode */ | ||
86 | #define TIF_USERSPACE 31 /* true if FS sets userspace */ | 87 | #define TIF_USERSPACE 31 /* true if FS sets userspace */ |
87 | 88 | ||
88 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 89 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
@@ -94,6 +95,7 @@ static inline struct thread_info *current_thread_info(void) | |||
94 | #define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP) | 95 | #define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP) |
95 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) | 96 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) |
96 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 97 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
98 | #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) | ||
97 | 99 | ||
98 | /* XXX: These two masks must never span more than 16 bits! */ | 100 | /* XXX: These two masks must never span more than 16 bits! */ |
99 | /* work to do on interrupt/exception return */ | 101 | /* work to do on interrupt/exception return */ |