Path: blob/master/arch/avr32/mach-at32ap/include/mach/pm.h
10820 views
/*1* AVR32 AP Power Management.2*3* Copyright (C) 2008 Atmel Corporation4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#ifndef __ASM_AVR32_ARCH_PM_H10#define __ASM_AVR32_ARCH_PM_H1112/* Possible arguments to the "sleep" instruction */13#define CPU_SLEEP_IDLE 014#define CPU_SLEEP_FROZEN 115#define CPU_SLEEP_STANDBY 216#define CPU_SLEEP_STOP 317#define CPU_SLEEP_STATIC 51819#ifndef __ASSEMBLY__20extern void cpu_enter_idle(void);21extern void cpu_enter_standby(unsigned long sdramc_base);2223extern bool disable_idle_sleep;2425static inline void cpu_disable_idle_sleep(void)26{27disable_idle_sleep = true;28}2930static inline void cpu_enable_idle_sleep(void)31{32disable_idle_sleep = false;33}3435static inline void cpu_idle_sleep(void)36{37/*38* If we're using the COUNT and COMPARE registers for39* timekeeping, we can't use the IDLE state.40*/41if (disable_idle_sleep)42cpu_relax();43else44cpu_enter_idle();45}4647void intc_set_suspend_handler(unsigned long offset);48#endif4950#endif /* __ASM_AVR32_ARCH_PM_H */515253