Switch AARCH32/AARCH64 to __aarch64__

NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.

All common C compilers pre-define the same macros to signal which
architecture the code is being compiled for: __arm__ for AArch32 (or
earlier versions) and __aarch64__ for AArch64. There's no need for TF-A
to define its own custom macros for this. In order to unify code with
the export headers (which use __aarch64__ to avoid another dependency),
let's deprecate the AARCH32 and AARCH64 macros and switch the code base
over to the pre-defined standard macro. (Since it is somewhat
unintuitive that __arm__ only means AArch32, let's standardize on only
using __aarch64__.)

Change-Id: Ic77de4b052297d77f38fc95f95f65a8ee70cf200
Signed-off-by: Julius Werner <jwerner@chromium.org>
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index 7d8d60c..79b0e71 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -15,10 +15,10 @@
 
 #include "bl2_private.h"
 
-#ifdef AARCH32
-#define NEXT_IMAGE	"BL32"
-#else
+#ifdef __aarch64__
 #define NEXT_IMAGE	"BL31"
+#else
+#define NEXT_IMAGE	"BL32"
 #endif
 
 #if !BL2_AT_EL3
@@ -31,7 +31,7 @@
 	/* Perform early platform-specific setup */
 	bl2_early_platform_setup2(arg0, arg1, arg2, arg3);
 
-#ifdef AARCH64
+#ifdef __aarch64__
 	/*
 	 * Update pointer authentication key before the MMU is enabled. It is
 	 * saved in the rodata section, that can be writen before enabling the
@@ -39,7 +39,7 @@
 	 * in the early platform setup.
 	 */
 	bl_handle_pauth();
-#endif /* AARCH64 */
+#endif /* __aarch64__ */
 
 	/* Perform late platform-specific setup */
 	bl2_plat_arch_setup();
@@ -55,7 +55,7 @@
 	/* Perform early platform-specific setup */
 	bl2_el3_early_platform_setup(arg0, arg1, arg2, arg3);
 
-#ifdef AARCH64
+#ifdef __aarch64__
 	/*
 	 * Update pointer authentication key before the MMU is enabled. It is
 	 * saved in the rodata section, that can be writen before enabling the
@@ -63,7 +63,7 @@
 	 * in the early platform setup.
 	 */
 	bl_handle_pauth();
-#endif /* AARCH64 */
+#endif /* __aarch64__ */
 
 	/* Perform late platform-specific setup */
 	bl2_el3_plat_arch_setup();
@@ -97,14 +97,14 @@
 	next_bl_ep_info = bl2_load_images();
 
 #if !BL2_AT_EL3
-#ifdef AARCH32
+#ifndef __aarch64__
 	/*
 	 * For AArch32 state BL1 and BL2 share the MMU setup.
 	 * Given that BL2 does not map BL1 regions, MMU needs
 	 * to be disabled in order to go back to BL1.
 	 */
 	disable_mmu_icache_secure();
-#endif /* AARCH32 */
+#endif /* !__aarch64__ */
 
 	console_flush();