aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/headsmp-apmu.S
diff options
context:
space:
mode:
authorMylène Josserand <mylene.josserand@bootlin.com>2018-05-04 21:05:45 +0200
committerMaxime Ripard <maxime.ripard@bootlin.com>2018-05-08 14:57:17 +0200
commitcad160ed0a94927e59bb5e31ab192d70f08decae (patch)
treef108d459a90c37a9e53c4ec00ac1a0517dcac5b2 /arch/arm/mach-shmobile/headsmp-apmu.S
parentARM: sunxi: Add initialization of CNTVOFF (diff)
downloadlinux-dev-cad160ed0a94927e59bb5e31ab192d70f08decae.tar.xz
linux-dev-cad160ed0a94927e59bb5e31ab192d70f08decae.zip
ARM: shmobile: Convert file to use cntvoff
Now that a common function is available for CNTVOFF's initialization, let's convert shmobile-apmu code to use this function. Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'arch/arm/mach-shmobile/headsmp-apmu.S')
-rw-r--r--arch/arm/mach-shmobile/headsmp-apmu.S22
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/arm/mach-shmobile/headsmp-apmu.S b/arch/arm/mach-shmobile/headsmp-apmu.S
index 5672b5849401..d49ab194766a 100644
--- a/arch/arm/mach-shmobile/headsmp-apmu.S
+++ b/arch/arm/mach-shmobile/headsmp-apmu.S
@@ -11,29 +11,9 @@
#include <linux/linkage.h>
#include <asm/assembler.h>
-ENTRY(shmobile_init_cntvoff)
- /*
- * CNTVOFF has to be initialized either from non-secure Hypervisor
- * mode or secure Monitor mode with SCR.NS==1. If TrustZone is enabled
- * then it should be handled by the secure code
- */
- cps #MON_MODE
- mrc p15, 0, r1, c1, c1, 0 /* Get Secure Config */
- orr r0, r1, #1
- mcr p15, 0, r0, c1, c1, 0 /* Set Non Secure bit */
- instr_sync
- mov r0, #0
- mcrr p15, 4, r0, r0, c14 /* CNTVOFF = 0 */
- instr_sync
- mcr p15, 0, r1, c1, c1, 0 /* Set Secure bit */
- instr_sync
- cps #SVC_MODE
- ret lr
-ENDPROC(shmobile_init_cntvoff)
-
#ifdef CONFIG_SMP
ENTRY(shmobile_boot_apmu)
- bl shmobile_init_cntvoff
+ bl secure_cntvoff_init
b secondary_startup
ENDPROC(shmobile_boot_apmu)
#endif