]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/lib/gic_64.S
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arm / lib / gic_64.S
index a3e18f7713e571ead9d9f81c6242e486e1c092da..745c7858da7979e8ff6321a37d30063a0fab2959 100644 (file)
@@ -1,10 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * GIC Initialization Routines.
  *
  * (C) Copyright 2013
  * David Feng <fenghua@phytium.com.cn>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <asm-offsets.h>
@@ -46,11 +45,19 @@ ENTRY(gic_init_secure)
        ldr     w9, [x0, GICD_TYPER]
        and     w10, w9, #0x1f          /* ITLinesNumber */
        cbz     w10, 1f                 /* No SPIs */
-       add     x11, x0, (GICD_IGROUPRn + 4)
+       add     x11, x0, GICD_IGROUPRn
        mov     w9, #~0                 /* Config SPIs as Grp1 */
+       str     w9, [x11], #0x4
 0:     str     w9, [x11], #0x4
        sub     w10, w10, #0x1
        cbnz    w10, 0b
+
+       ldr     x1, =GICC_BASE          /* GICC_CTLR */
+       mov     w0, #3                  /* EnableGrp0 | EnableGrp1 */
+       str     w0, [x1]
+
+       mov     w0, #1 << 7             /* allow NS access to GICC_PMR */
+       str     w0, [x1, #4]            /* GICC_PMR */
 #endif
 1:
        ret