2 * SMP support for APMU based systems with Cortex A7/A15
4 * Copyright (C) 2014 Renesas Electronics Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include <linux/linkage.h>
12 #include <asm/assembler.h>
14 ENTRY(shmobile_init_cntvoff)
16 * CNTVOFF has to be initialized either from non-secure Hypervisor
17 * mode or secure Monitor mode with SCR.NS==1. If TrustZone is enabled
18 * then it should be handled by the secure code
21 mrc p15, 0, r1, c1, c1, 0 /* Get Secure Config */
23 mcr p15, 0, r0, c1, c1, 0 /* Set Non Secure bit */
26 mcrr p15, 4, r0, r0, c14 /* CNTVOFF = 0 */
28 mcr p15, 0, r1, c1, c1, 0 /* Set Secure bit */
32 ENDPROC(shmobile_init_cntvoff)
35 ENTRY(shmobile_boot_apmu)
36 bl shmobile_init_cntvoff
38 ENDPROC(shmobile_boot_apmu)