diff options
author | Nick Hu <nickhu@andestech.com> | 2018-10-24 13:14:32 +0300 |
---|---|---|
committer | Greentime Hu <greentime@andestech.com> | 2018-11-06 13:01:41 +0300 |
commit | 7938e6315c9af3d4a40185b537733bbce842305a (patch) | |
tree | 4239f342490d2a7c1c2753ab3e3bcbea20bcde8b /arch/nds32/Kconfig | |
parent | cf26edd840dc65b122a0f5e22d2d81ad05eccb2d (diff) | |
download | linux-7938e6315c9af3d4a40185b537733bbce842305a.tar.xz |
nds32: Power management for nds32
There are three sleep states in nds32:
suspend to idle,
suspend to standby,
suspend to ram
In suspend to ram, we use the 'standby' instruction to emulate
power management device to hang the system util wakeup source
send wakeup events to break the loop.
First, we push the general purpose registers and system registers
to stack. Second, we translate stack pointer to physical address
and store to memory to save the stack pointer. Third, after write
back and invalid the cache we hang in 'standby' intruction.
When wakeup source trigger wake up events, the loop will be break
and resume the system.
Signed-off-by: Nick Hu <nickhu@andestech.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/Kconfig')
-rw-r--r-- | arch/nds32/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig index 97786a865023..5a11772a514d 100644 --- a/arch/nds32/Kconfig +++ b/arch/nds32/Kconfig @@ -93,3 +93,13 @@ endmenu menu "Kernel Features" source "kernel/Kconfig.hz" endmenu + +menu "Power management options" +config SYS_SUPPORTS_APM_EMULATION + bool + +config ARCH_SUSPEND_POSSIBLE + def_bool y + +source "kernel/power/Kconfig" +endmenu |