linux/arch/nds32/kernel
Nick Hu 7938e6315c 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>
2018-11-06 18:01:41 +08:00
..
vdso nds32: fix building failed if using elf toolchain. 2018-03-16 15:45:22 +08:00
asm-offsets.c
atl2c.c nds32: add NULL entry to the end of_device_id array 2018-09-04 14:45:15 +08:00
cacheinfo.c nds32: Cache and TLB routines 2018-02-22 10:44:32 +08:00
devtree.c nds32: Device tree support 2018-02-22 10:44:34 +08:00
dma.c nds32: use generic dma_noncoherent_ops 2018-05-29 16:10:32 +02:00
ex-entry.S nds32: Fix a kernel panic issue because of wrong frame pointer access. 2018-09-04 14:45:19 +08:00
ex-exit.S nds32: Fix a kernel panic issue because of wrong frame pointer access. 2018-09-04 14:45:19 +08:00
ex-scall.S nds32: System calls handling 2018-02-22 10:44:33 +08:00
ftrace.c nds32: Fix a kernel panic issue because of wrong frame pointer access. 2018-09-04 14:45:19 +08:00
head.S nds32: Fill all TLB entries with kernel image mapping 2018-11-06 18:01:39 +08:00
irq.c nds32: IRQ handling 2018-02-22 10:44:32 +08:00
Makefile nds32: Power management for nds32 2018-11-06 18:01:41 +08:00
module.c nds32: fix logic for module 2018-09-04 14:45:15 +08:00
nds32_ksyms.c nds32: Library functions 2018-02-22 10:44:33 +08:00
perf_event_cpu.c nds32: Add perf call-graph support. 2018-11-06 18:01:40 +08:00
pm.c nds32: Power management for nds32 2018-11-06 18:01:41 +08:00
process.c nds32: Process management 2018-02-22 10:44:32 +08:00
ptrace.c nds32: Debugging support 2018-02-22 10:44:34 +08:00
setup.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
signal.c nds32: Signal handling support 2018-02-22 10:44:33 +08:00
sleep.S nds32: Power management for nds32 2018-11-06 18:01:41 +08:00
stacktrace.c nds32: Add macro definition for offset of lp register on stack 2018-09-04 14:45:19 +08:00
sys_nds32.c nds32: System calls handling 2018-02-22 10:44:33 +08:00
syscall_table.c nds32: System calls handling 2018-02-22 10:44:33 +08:00
time.c nds32: Generic timers support 2018-02-22 10:44:34 +08:00
traps.c nds32: Only print one page of stack when die to prevent printing too much information. 2018-09-04 14:45:19 +08:00
vdso.c nds32: Fix compiler warning, Wstringop-overflow, in vdso.c 2018-05-23 13:26:22 +08:00
vmlinux.lds.S nds32: linker script: GCOV kernel may refers data in __exit 2018-09-05 10:16:26 +08:00