[2/2] ARM: tegra: avoid touching Secure registers in reset handler
diff mbox series

Message ID c93b79b052370f4058033dae716225aec94c4991.1541884486.git.mirq-linux@rere.qmqm.pl
State New
Headers show
Series
  • ARM: tegra: enable SMP boot with TF
Related show

Commit Message

Michał Mirosław Nov. 10, 2018, 9:18 p.m. UTC
This allows secondary CPUs to boot with Trusted Foundations firmware.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 arch/arm/mach-tegra/reset-handler.S | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S
index fe4c568aeace..56300ec9f1a0 100644
--- a/arch/arm/mach-tegra/reset-handler.S
+++ b/arch/arm/mach-tegra/reset-handler.S
@@ -139,6 +139,13 @@  ENTRY(__tegra_cpu_reset_handler)
 	cpsid	aif, 0x13			@ SVC mode, interrupts disabled
 
 	tegra_get_soc_id TEGRA_APB_MISC_BASE, r6
+
+#ifdef CONFIG_TRUSTED_FOUNDATIONS
+	adr	r3, __tegra_cpu_reset_handler_data
+	ldr	r0, [r3, #RESET_DATA(TF_PRESENT)]
+	cmp	r0, #0
+	bne	after_errata
+#endif	/* CONFIG_TRUSTED_FOUNDATIONS */
 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
 t20_check:
 	cmp	r6, #TEGRA20