]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/include/asm/macro.h
ARM: tegra: pinmux: support Tegra210's e_io_hv pin option
[u-boot] / arch / arm / include / asm / macro.h
index 541b4432549bf38b8c99504b6299ee4d87559e98..5f7c7e050145d626fc65bfb3b75f973865a3fbba 100644 (file)
@@ -73,6 +73,28 @@ lr   .req    x30
        b.eq    \el1_label
 .endm
 
+/*
+ * Branch if current processor is a Cortex-A57 core.
+ */
+.macro branch_if_a57_core, xreg, a57_label
+       mrs     \xreg, midr_el1
+       lsr     \xreg, \xreg, #4
+       and     \xreg, \xreg, #0x00000FFF
+       cmp     \xreg, #0xD07           /* Cortex-A57 MPCore processor. */
+       b.eq    \a57_label
+.endm
+
+/*
+ * Branch if current processor is a Cortex-A53 core.
+ */
+.macro branch_if_a53_core, xreg, a53_label
+       mrs     \xreg, midr_el1
+       lsr     \xreg, \xreg, #4
+       and     \xreg, \xreg, #0x00000FFF
+       cmp     \xreg, #0xD03           /* Cortex-A53 MPCore processor. */
+       b.eq    \a53_label
+.endm
+
 /*
  * Branch if current processor is a slave,
  * choose processor with all zero affinity value as the master.
@@ -193,7 +215,7 @@ lr  .req    x30
 0 :    wfi
        ldr     \wreg2, [\xreg1, GICC_AIAR]
        str     \wreg2, [\xreg1, GICC_AEOIR]
-       and     \wreg2, \wreg2, #3ff
+       and     \wreg2, \wreg2, #0x3ff
        cbnz    \wreg2, 0b
 .endm
 #endif