aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorJoseph Lo <josephl@nvidia.com>2013-05-20 06:39:26 -0400
committerStephen Warren <swarren@nvidia.com>2013-05-22 17:19:22 -0400
commitecc4d9da2136715e9df9f5f885910f89d66d2949 (patch)
treee4f64fae0ba184d19813ff9eb408c83d738325b0 /arch/arm/mach-tegra
parentf6d06f33664756cfa8bce3494e586be32b213bdd (diff)
ARM: tegra: make tegra_resume can work for Tegra114
Tegra114 had a newer flow controller hardware that makes its behavior and configurations are different with other Tegra series. We fix the common resume function of tegra_resume to make it can work on Tegra114 by checking SoC ID. And also checking CPU primary part number to isolate the support code for Cortex A9 and A15. Signed-off-by: Joseph Lo <josephl@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/reset-handler.S13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S
index 40af405b0465..424e01f5bca7 100644
--- a/arch/arm/mach-tegra/reset-handler.S
+++ b/arch/arm/mach-tegra/reset-handler.S
@@ -47,23 +47,27 @@ ENTRY(tegra_resume)
47 THUMB( it ne ) 47 THUMB( it ne )
48 bne cpu_resume @ no 48 bne cpu_resume @ no
49 49
50#ifdef CONFIG_ARCH_TEGRA_3x_SOC 50#ifndef CONFIG_ARCH_TEGRA_2x_SOC
51 /* Are we on Tegra20? */ 51 /* Are we on Tegra20? */
52 tegra_get_soc_id TEGRA_APB_MISC_BASE, r6 52 tegra_get_soc_id TEGRA_APB_MISC_BASE, r6
53 cmp r6, #TEGRA20 53 cmp r6, #TEGRA20
54 beq 1f @ Yes 54 beq 1f @ Yes
55 /* Clear the flow controller flags for this CPU. */ 55 /* Clear the flow controller flags for this CPU. */
56 mov32 r2, TEGRA_FLOW_CTRL_BASE + FLOW_CTRL_CPU0_CSR @ CPU0 CSR 56 cpu_to_csr_req r1, r0
57 ldr r1, [r2] 57 mov32 r2, TEGRA_FLOW_CTRL_BASE
58 ldr r1, [r2, r1]
58 /* Clear event & intr flag */ 59 /* Clear event & intr flag */
59 orr r1, r1, \ 60 orr r1, r1, \
60 #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG 61 #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
61 movw r0, #0x0FFD @ enable, cluster_switch, immed, & bitmaps 62 movw r0, #0x3FFD @ enable, cluster_switch, immed, bitmaps
63 @ & ext flags for CPU power mgnt
62 bic r1, r1, r0 64 bic r1, r1, r0
63 str r1, [r2] 65 str r1, [r2]
641: 661:
65#endif 67#endif
66 68
69 check_cpu_part_num 0xc09, r8, r9
70 bne not_ca9
67#ifdef CONFIG_HAVE_ARM_SCU 71#ifdef CONFIG_HAVE_ARM_SCU
68 /* enable SCU */ 72 /* enable SCU */
69 mov32 r0, TEGRA_ARM_PERIF_BASE 73 mov32 r0, TEGRA_ARM_PERIF_BASE
@@ -74,6 +78,7 @@ ENTRY(tegra_resume)
74 78
75 /* L2 cache resume & re-enable */ 79 /* L2 cache resume & re-enable */
76 l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr 80 l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr
81not_ca9:
77 82
78 b cpu_resume 83 b cpu_resume
79ENDPROC(tegra_resume) 84ENDPROC(tegra_resume)