From: josephl@nvidia.com (Joseph Lo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] ARM: tegra: make tegra_resume can work for Tegra114
Date: Wed, 15 May 2013 18:27:21 +0800 [thread overview]
Message-ID: <1368613644-11863-4-git-send-email-josephl@nvidia.com> (raw)
In-Reply-To: <1368613644-11863-1-git-send-email-josephl@nvidia.com>
Tegra114 is an ARM Cortex-A15 based SoC and some of the flow controller
hardware 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>
---
arch/arm/mach-tegra/reset-handler.S | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S
index 525f1b9..893f6b7 100644
--- a/arch/arm/mach-tegra/reset-handler.S
+++ b/arch/arm/mach-tegra/reset-handler.S
@@ -47,22 +47,25 @@ ENTRY(tegra_resume)
THUMB( it ne )
bne cpu_resume @ no
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
/* Are we on Tegra20? */
tegra_check_soc_id TEGRA20, TEGRA_APB_MISC_BASE, r6, r7
beq 1f @ Yes
/* Clear the flow controller flags for this CPU. */
- mov32 r2, TEGRA_FLOW_CTRL_BASE + FLOW_CTRL_CPU0_CSR @ CPU0 CSR
- ldr r1, [r2]
+ cpu_to_csr_req r1, r0
+ mov32 r2, TEGRA_FLOW_CTRL_BASE
+ ldr r1, [r2, r1]
/* Clear event & intr flag */
orr r1, r1, \
#FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
- movw r0, #0x0FFD @ enable, cluster_switch, immed, & bitmaps
+ movw r0, #0x3FFD @ enable, cluster_switch, immed, & bitmaps
bic r1, r1, r0
str r1, [r2]
1:
#endif
+ check_cpu_part_num 0xc09, r8, r9
+ bne not_ca9
#ifdef CONFIG_HAVE_ARM_SCU
/* enable SCU */
mov32 r0, TEGRA_ARM_PERIF_BASE
@@ -73,6 +76,7 @@ ENTRY(tegra_resume)
/* L2 cache resume & re-enable */
l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr
+not_ca9:
b cpu_resume
ENDPROC(tegra_resume)
--
1.8.2.2
next prev parent reply other threads:[~2013-05-15 10:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 10:27 [PATCH 0/6] ARM: tegra114: add CPU hotplug support Joseph Lo
2013-05-15 10:27 ` [PATCH 1/6] ARM: tegra: add an assembly marco to check Tegra SoC ID Joseph Lo
2013-05-15 22:43 ` Stephen Warren
2013-05-16 10:09 ` Joseph Lo
2013-05-16 18:21 ` Stephen Warren
2013-05-15 10:27 ` [PATCH 2/6] ARM: tegra: skip SCU and PL310 code when CPU is not Cortex-A9 Joseph Lo
2013-05-15 22:48 ` Stephen Warren
2013-05-16 10:13 ` Joseph Lo
2013-05-15 10:27 ` Joseph Lo [this message]
2013-05-15 22:57 ` [PATCH 3/6] ARM: tegra: make tegra_resume can work for Tegra114 Stephen Warren
2013-05-16 10:35 ` Joseph Lo
2013-05-16 18:24 ` Stephen Warren
2013-05-15 10:27 ` [PATCH 4/6] ARM: tegra114: add power up sequence for warm boot CPU Joseph Lo
2013-05-15 10:27 ` [PATCH 5/6] clk: tegra114: implement wait_for_reset and disable_clock for tegra_cpu_car_ops Joseph Lo
2013-05-15 23:02 ` Stephen Warren
2013-05-16 19:17 ` Mike Turquette
2013-05-15 10:27 ` [PATCH 6/6] ARM: tegra114: add CPU hotplug support Joseph Lo
2013-05-15 23:11 ` Stephen Warren
2013-05-16 11:14 ` Joseph Lo
2013-05-16 18:26 ` Stephen Warren
2013-05-15 23:38 ` [PATCH 0/6] " Stephen Warren
2013-05-16 9:53 ` Joseph Lo
2013-05-16 18:19 ` Stephen Warren
2013-05-17 10:15 ` Joseph Lo
2013-05-17 10:27 ` Russell King - ARM Linux
2013-05-17 10:23 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368613644-11863-4-git-send-email-josephl@nvidia.com \
--to=josephl@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).