ARM: at91/pm: standby mode uses same sram function as suspend to memory mode
To simply the PM code, the suspend to standby mode uses same sram function as the suspend to memory mode, running in the internal SRAM, instead of the respective code for each mode. For the suspend to standby mode, the master clock doesn't switch to the slow clock, and PLLA and the main oscillator doesn't turn off as well. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
committed by
Nicolas Ferre
parent
d94e688cae
commit
23be4be5a6
@@ -15,6 +15,14 @@
|
||||
|
||||
#include <mach/at91_ramc.h>
|
||||
|
||||
#define AT91_PM_MEMTYPE_MASK 0x0f
|
||||
|
||||
#define AT91_PM_MODE_OFFSET 4
|
||||
#define AT91_PM_MODE_MASK 0x01
|
||||
#define AT91_PM_MODE(x) (((x) & AT91_PM_MODE_MASK) << AT91_PM_MODE_OFFSET)
|
||||
|
||||
#define AT91_PM_SLOW_CLOCK 0x01
|
||||
|
||||
/*
|
||||
* The AT91RM9200 goes into self-refresh mode with this command, and will
|
||||
* terminate self-refresh automatically on the next SDRAM access.
|
||||
@@ -25,6 +33,7 @@
|
||||
* still in self-refresh is "not recommended", but seems to work.
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
static inline void at91rm9200_standby(void)
|
||||
{
|
||||
u32 lpr = at91_ramc_read(0, AT91RM9200_SDRAMC_LPR);
|
||||
@@ -106,3 +115,4 @@ static inline void at91sam9_sdram_standby(void)
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user