]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/include/asm/macro.h
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arm / include / asm / macro.h
index 2553e3e349c5da1a4572fe735e0cbb5ec4ea5f04..d5a7a8bb61cc418baadea9b5bf98200b1a22d158 100644 (file)
@@ -1,9 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * include/asm-arm/macro.h
  *
  * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __ASM_ARM_MACRO_H__
@@ -131,6 +130,7 @@ lr  .req    x30
        /* NOTE: MPIDR handling will be erroneous on multi-cluster machines */
        mrs     \xreg1, mpidr_el1
        lsr     \xreg2, \xreg1, #32
+       lsl     \xreg2, \xreg2, #32
        lsl     \xreg1, \xreg1, #40
        lsr     \xreg1, \xreg1, #40
        orr     \xreg1, \xreg1, \xreg2
@@ -182,11 +182,17 @@ lr        .req    x30
 
        /*
         * The next lower exception level is AArch64, 64bit EL2 | HCE |
-        * SMD | RES1 (Bits[5:4]) | Non-secure EL0/EL1.
+        * RES1 (Bits[5:4]) | Non-secure EL0/EL1.
+        * and the SMD depends on requirements.
         */
+#ifdef CONFIG_ARMV8_PSCI
+       ldr     \tmp, =(SCR_EL3_RW_AARCH64 | SCR_EL3_HCE_EN |\
+                       SCR_EL3_RES1 | SCR_EL3_NS_EN)
+#else
        ldr     \tmp, =(SCR_EL3_RW_AARCH64 | SCR_EL3_HCE_EN |\
                        SCR_EL3_SMD_DIS | SCR_EL3_RES1 |\
                        SCR_EL3_NS_EN)
+#endif
        msr     scr_el3, \tmp
 
        /* Return to the EL2_SP2 mode from EL3 */