u-boot/arch
Anson Huang 57b620255e imx: mx7: add system suspend/resume support
This patch adds system suspend/resume support,
when linux kernel enters deep sleep mode, SoC will go
into below mode:

 - CA7 platform goes into STOP mode;
 - SoC goes into DSM mode;
 - DDR goes into self-refresh mode;
 - CPU0/SCU will be powered down.

When wake up event arrives:

 - SoC DSM mdoe exits;
 - CA7 platform exit STOP mode, SCU/CPU0 power up;
 - Invalidate L1 cache;
 - DDR exit self-refresh mode;
 - Do secure monitor mode related initialization;
 - Jump to linux kernel resume entry.

Belwo is the log of 1 iteration of system suspend/resume:

[  338.824862] PM: suspend entry (deep)
[  338.828853] PM: Syncing filesystems ... done.
[  338.834433] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  338.842939] OOM killer disabled.
[  338.846182] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  338.869717] PM: suspend devices took 0.010 seconds
[  338.877846] Disabling non-boot CPUs ...
[  338.960301] Retrying again to check for CPU kill
[  338.964953] CPU1 killed.
[  338.968104] Enabling non-boot CPUs ...
[  338.973598] CPU1 is up
[  339.267155] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[  339.275833] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[  339.284158] mmc1: queuing unknown CIS tuple 0x80 (6 bytes)
[  339.385065] PM: resume devices took 0.400 seconds
[  339.389836] OOM killer enabled.
[  339.392986] Restarting tasks ... done.
[  339.398990] PM: suspend exit

The resume entry function has to initialize stack pointer before calling
C code, otherwise there will be an external abort occur, in additional,
invalidate L1 cache must be done in secure section as well, so this
patch also adds assembly code back and keep it as simple as possible.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Tested-by: Stefan Agner <stefan@agner.ch>
2018-09-04 08:47:23 +02:00
..
arc ARC: Enable unaligned access in hardware if compiler uses it 2018-07-31 07:49:47 +03:00
arm imx: mx7: add system suspend/resume support 2018-09-04 08:47:23 +02:00
m68k m68k: m5253evbe: Remove this board 2018-07-23 14:33:21 -04:00
microblaze configs: Migrate CONFIG_NR_DRAM_BANKS 2018-08-16 16:45:02 -04:00
mips bcm968380gerg: add initial support 2018-08-08 13:38:17 +02:00
nds32 nds32: Define PLATFORM__CLEAR_BIT for generic_clear_bit() 2018-05-15 21:44:05 -04:00
nios2 .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore 2018-06-18 14:43:12 -04:00
powerpc Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
riscv riscv: Include bss subsections in linker script 2018-08-20 14:25:59 +02:00
sandbox Merge branch 'master' of git://git.denx.de/u-boot-usb 2018-08-24 16:11:01 -04:00
sh SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
x86 Patch queue for efi - 2018-08-21 2018-08-21 13:15:21 -04:00
xtensa CONFIG_SYS_GENERIC_BOARD: Finish migration 2018-08-16 16:45:02 -04:00
.gitignore
Kconfig dm: Change CMD_DM enabling 2018-07-30 07:18:48 -04:00