mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 07:06:45 +07:00
e7a932b196
The LP1 suspend mode will power off the CPU, clock gated the PLLs and put SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The sequence when LP1 suspending: * tunning off L1 data cache and the MMU * storing some EMC registers, DPD (deep power down) status, clk source of mselect and SCLK burst policy * putting SDRAM into self-refresh * switching CPU to CLK_M (12MHz OSC) * tunning off PLLM, PLLP, PLLA, PLLC and PLLX * switching SCLK to CLK_S (32KHz OSC) * shutting off the CPU rail The sequence of LP1 resuming: * re-enabling PLLM, PLLP, PLLA, PLLC and PLLX * restoring the clk source of mselect and SCLK burst policy * setting up CCLK burst policy to PLLX * restoring DPD status and some EMC registers * resuming SDRAM to normal mode * jumping to the "tegra_resume" from PMC_SCRATCH41 Due to the SDRAM will be put into self-refresh mode, the low level procedures of LP1 suspending and resuming should be copied to TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before restoring the CPU context when resuming, the SDRAM needs to be switched back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy be restored, CCLK burst policy be set in PLLX. Then jumping to "tegra_resume" that was expected to be stored in PMC_SCRATCH41 to restore CPU context and back to kernel. Based on the work by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Joseph Lo <josephl@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> |
||
---|---|---|
.. | ||
apbio.c | ||
apbio.h | ||
board-harmony-pcie.c | ||
board-paz00.c | ||
board-paz00.h | ||
board.h | ||
common.c | ||
common.h | ||
cpuidle-tegra20.c | ||
cpuidle-tegra30.c | ||
cpuidle-tegra114.c | ||
cpuidle.c | ||
cpuidle.h | ||
flowctrl.c | ||
flowctrl.h | ||
fuse.c | ||
fuse.h | ||
gpio-names.h | ||
headsmp.S | ||
hotplug.c | ||
io.c | ||
iomap.h | ||
irammap.h | ||
irq.c | ||
irq.h | ||
Kconfig | ||
Makefile | ||
pcie.c | ||
platsmp.c | ||
pm-tegra30.c | ||
pm.c | ||
pm.h | ||
pmc.c | ||
pmc.h | ||
powergate.c | ||
reset-handler.S | ||
reset.c | ||
reset.h | ||
sleep-tegra20.S | ||
sleep-tegra30.S | ||
sleep.h | ||
sleep.S | ||
tegra2_emc.c | ||
tegra2_emc.h | ||
tegra20_speedo.c | ||
tegra30_speedo.c | ||
tegra114_speedo.c | ||
tegra.c |