u-boot/arch/arm
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
..
cpu armv8: fsl-layerscape: Update README.falcon for compression 2018-08-23 08:17:35 -07:00
dts dts: imx6ul_evk: Add DTS files for 14x14 EVK and 9x9 EVK boards 2018-09-04 08:47:23 +02:00
include watchdog: mx25: use the imx_watchdog driver for mx25 2018-09-04 08:47:23 +02:00
lib ARM: PSCI: Enable the PSCI node 2018-07-26 13:15:30 -07:00
mach-aspeed regmap: change regmap_init_mem() to take ofnode instead udevice 2018-05-07 15:49:51 -04:00
mach-at91 dm: Change CMD_DM enabling 2018-07-30 07:18:48 -04:00
mach-bcm283x efi_loader: Convert runtime reset from switch to if statements 2018-06-14 10:52:14 +02:00
mach-bcmstb board: arm: bcmstb: Declare get_ticks in timer.h 2018-08-24 13:20:19 -04:00
mach-davinci Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-exynos Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-highbank SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-imx imx: mx7: add system suspend/resume support 2018-09-04 08:47:23 +02:00
mach-integrator env: Convert CONFIG_ENV_IS_IN... to a choice 2017-08-15 20:50:01 -04:00
mach-keystone SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-kirkwood Convert CONFIG_MII et al to Kconfig 2018-08-17 13:03:54 -04:00
mach-meson dm: Change CMD_DM enabling 2018-07-30 07:18:48 -04:00
mach-mvebu Convert CONFIG_MII et al to Kconfig 2018-08-17 13:03:54 -04:00
mach-omap2 Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-orion5x ARM: orion5x: fix use of callee-saved registers in lowloevel_init 2018-06-07 09:12:26 -04:00
mach-owl board: Add uCRobotics Bubblegum-96 board support 2018-07-09 15:25:23 -04:00
mach-qemu Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-rmobile ARM: rmobile: Enable USB PHY on Gen2 2018-08-14 11:31:25 +02:00
mach-rockchip dm: convert device_get_global_by_of_offset() to device_get_global_by_ofnode() 2018-08-21 16:21:37 +02:00
mach-s5pc1xx SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-snapdragon snapdragon: added MAC generation functions 2018-08-13 14:04:04 -04:00
mach-socfpga ARM: socfpga: Convert Arria10 to timer framework 2018-08-24 12:05:20 +02:00
mach-sti
mach-stm32 Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-stm32mp stm32mp1: activate MISC support in SPL 2018-07-20 15:55:05 -04:00
mach-sunxi sunxi: A64: fix default DRAM_ODT_EN symbol 2018-08-13 16:47:38 +05:30
mach-tegra ARM: tegra: avoid more operations in non-secure world 2018-08-21 08:41:00 -07:00
mach-uniphier Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-versatile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-zynq Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynq 2018-08-06 08:44:35 +02:00
mach-zynqmp-r5 arm: zynqmp: Add ZynqMP minimal R5 support 2018-05-11 09:38:23 +02:00
thumb1/include/asm/proc-armv SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
config.mk efi_loader: Rename sections to allow for implicit data 2018-07-25 14:57:44 +02:00
Kconfig cmd: ubi: change 'default y' for SUNXI to 'imply' in Kconfig 2018-08-26 12:24:03 -04:00
Kconfig.debug
Makefile board: arm: Add support for Broadcom BCM7445 2018-07-10 16:55:57 -04:00