Commit 9c65b846 authored by Stephen Warren's avatar Stephen Warren Committed by Thierry Reding
Browse files

ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume



Configure the clock controller to set an alternate clock for the CPU
when it receives an IRQ during LP1 (system suspend). Specifically, use
clk_m (the crystal) rather than clk_s (a 32KHz clock). Such an IRQ will
be the LP1 wake event. This reduces the amount of time taken to resume
from LP1.

NVIDIA's downstream kernel executes this code on both Tegra30 and
Tegra124, so it appears OK to make this change unconditionally.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent cf94a7a0
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -670,8 +670,12 @@ tegra30_switch_cpu_to_clk32k:
	pll_iddq_entry r1, r5, CLK_RESET_PLLX_MISC3, CLK_RESET_PLLX_MISC3_IDDQ
_no_pll_in_iddq:

	/* switch to CLKS */
	mov	r0, #0	/* brust policy = 32KHz */
	/*
	 * Switch to clk_s (32KHz); bits 28:31=0
	 * Enable burst on CPU IRQ; bit 24=1
	 * Set IRQ burst clock source to clk_m; bits 10:8=0
	 */
	mov	r0, #(1 << 24)
	str	r0, [r5, #CLK_RESET_SCLK_BURST]

	ret	lr