2 * AVR32 AP Power Management.
4 * Copyright (C) 2008 Atmel Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #ifndef __ASM_AVR32_ARCH_PM_H
11 #define __ASM_AVR32_ARCH_PM_H
13 /* Possible arguments to the "sleep" instruction */
14 #define CPU_SLEEP_IDLE 0
15 #define CPU_SLEEP_FROZEN 1
16 #define CPU_SLEEP_STANDBY 2
17 #define CPU_SLEEP_STOP 3
18 #define CPU_SLEEP_STATIC 5
21 extern void cpu_enter_idle(void);
23 extern bool disable_idle_sleep
;
25 static inline void cpu_disable_idle_sleep(void)
27 disable_idle_sleep
= true;
30 static inline void cpu_enable_idle_sleep(void)
32 disable_idle_sleep
= false;
35 static inline void cpu_idle_sleep(void)
38 * If we're using the COUNT and COMPARE registers for
39 * timekeeping, we can't use the IDLE state.
41 if (disable_idle_sleep
)
48 #endif /* __ASM_AVR32_ARCH_PM_H */