Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__

NOTE: __ASSEMBLY__ macro is now deprecated in favor of __ASSEMBLER__.

All common C compilers predefine a macro called __ASSEMBLER__ when
preprocessing a .S file. There is no reason for TF-A to define it's own
__ASSEMBLY__ macro for this purpose instead. To unify code with the
export headers (which use __ASSEMBLER__ to avoid one extra dependency),
let's deprecate __ASSEMBLY__ and switch the code base over to the
predefined standard.

Change-Id: Id7d0ec8cf330195da80499c68562b65cb5ab7417
Signed-off-by: Julius Werner <jwerner@chromium.org>
diff --git a/include/drivers/arm/cci.h b/include/drivers/arm/cci.h
index c5ddcfd..5aea95a 100644
--- a/include/drivers/arm/cci.h
+++ b/include/drivers/arm/cci.h
@@ -100,7 +100,7 @@
 
 #define SLAVE_IF_UNUSED			-1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -121,5 +121,5 @@
 void cci_enable_snoop_dvm_reqs(unsigned int master_id);
 void cci_disable_snoop_dvm_reqs(unsigned int master_id);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* CCI_H */
diff --git a/include/drivers/arm/ccn.h b/include/drivers/arm/ccn.h
index 9c3abac..7f73768 100644
--- a/include/drivers/arm/ccn.h
+++ b/include/drivers/arm/ccn.h
@@ -46,7 +46,7 @@
  */
 #define CCN_GET_RUN_STATE(pstate)	(pstate & 0xf)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <stdint.h>
 
 /*
@@ -109,5 +109,5 @@
 					unsigned int node_id,
 					unsigned int reg_offset);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* CCN_H */
diff --git a/include/drivers/arm/css/sds.h b/include/drivers/arm/css/sds.h
index 114ae92..db4cbaa 100644
--- a/include/drivers/arm/css/sds.h
+++ b/include/drivers/arm/css/sds.h
@@ -70,7 +70,7 @@
 #define SDS_ERR_STRUCT_NOT_FOUND	-3
 #define SDS_ERR_STRUCT_NOT_FINALIZED	-4
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <stddef.h>
 #include <stdint.h>
 
@@ -85,6 +85,6 @@
 		size_t size, sds_access_mode_t mode);
 int sds_struct_write(uint32_t structure_id, unsigned int fld_off, void *data,
 		size_t size, sds_access_mode_t mode);
-#endif /*__ASSEMBLY__ */
+#endif /*__ASSEMBLER__ */
 
 #endif /* SDS_H */
diff --git a/include/drivers/arm/fvp/fvp_pwrc.h b/include/drivers/arm/fvp/fvp_pwrc.h
index ca173f3..39e2516 100644
--- a/include/drivers/arm/fvp/fvp_pwrc.h
+++ b/include/drivers/arm/fvp/fvp_pwrc.h
@@ -35,7 +35,7 @@
 
 #define PSYSR_INVALID		U(0xffffffff)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -50,6 +50,6 @@
 unsigned int fvp_pwrc_read_psysr(u_register_t mpidr);
 unsigned int fvp_pwrc_get_cpu_wkr(u_register_t mpidr);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* FVP_PWRC_H */
diff --git a/include/drivers/arm/gicv2.h b/include/drivers/arm/gicv2.h
index 6bc5101..ebcb216 100644
--- a/include/drivers/arm/gicv2.h
+++ b/include/drivers/arm/gicv2.h
@@ -116,7 +116,7 @@
 /* Interrupt ID mask for HPPIR, AHPPIR, IAR and AIAR CPU Interface registers */
 #define INT_ID_MASK		U(0x3ff)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <cdefs.h>
 #include <stdint.h>
@@ -184,5 +184,5 @@
 unsigned int gicv2_set_pmr(unsigned int mask);
 void gicv2_interrupt_set_cfg(unsigned int id, unsigned int cfg);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* GICV2_H */
diff --git a/include/drivers/arm/gicv3.h b/include/drivers/arm/gicv3.h
index 72221ac..9c72d4d 100644
--- a/include/drivers/arm/gicv3.h
+++ b/include/drivers/arm/gicv3.h
@@ -208,7 +208,7 @@
 #define GITS_CTLR_QUIESCENT_SHIFT	31
 #define GITS_CTLR_QUIESCENT_BIT		BIT_32(GITS_CTLR_QUIESCENT_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdbool.h>
 #include <stdint.h>
@@ -406,5 +406,5 @@
 void gicv3_clear_interrupt_pending(unsigned int id, unsigned int proc_num);
 unsigned int gicv3_set_pmr(unsigned int mask);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* GICV3_H */
diff --git a/include/drivers/arm/pl011.h b/include/drivers/arm/pl011.h
index f201f00..8733d19 100644
--- a/include/drivers/arm/pl011.h
+++ b/include/drivers/arm/pl011.h
@@ -83,7 +83,7 @@
 
 #define CONSOLE_T_PL011_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -101,6 +101,6 @@
 int console_pl011_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			   console_pl011_t *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* PL011_H */
diff --git a/include/drivers/arm/sp805.h b/include/drivers/arm/sp805.h
index 551bfe4..b00ede1 100644
--- a/include/drivers/arm/sp805.h
+++ b/include/drivers/arm/sp805.h
@@ -21,7 +21,7 @@
 #define SP805_CTR_RESEN			(U(1) << 1)
 #define SP805_CTR_INTEN			(U(1) << 0)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -31,6 +31,6 @@
 void sp805_stop(uintptr_t base);
 void sp805_refresh(uintptr_t base, unsigned int ticks);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* SP805_H */
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h
index 98ef0ec..32aeb03 100644
--- a/include/drivers/arm/tzc400.h
+++ b/include/drivers/arm/tzc400.h
@@ -93,7 +93,7 @@
 #define TZC_400_REGION_SIZE			U(0x20)
 #define TZC_400_ACTION_OFF			U(0x4)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <cdefs.h>
 #include <stdint.h>
@@ -154,6 +154,6 @@
 	tzc400_disable_filters();
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* TZC400_H */
diff --git a/include/drivers/arm/tzc_dmc500.h b/include/drivers/arm/tzc_dmc500.h
index 24bfaeb..cce074c 100644
--- a/include/drivers/arm/tzc_dmc500.h
+++ b/include/drivers/arm/tzc_dmc500.h
@@ -121,7 +121,7 @@
 /* Length of registers for configuring each region */
 #define TZC_DMC500_REGION_SIZE				U(0x018)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -147,5 +147,5 @@
 int tzc_dmc500_verify_complete(void);
 
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* TZC_DMC500_H */
diff --git a/include/drivers/auth/mbedtls/mbedtls_config.h b/include/drivers/auth/mbedtls/mbedtls_config.h
index d143d73..acfde26 100644
--- a/include/drivers/auth/mbedtls/mbedtls_config.h
+++ b/include/drivers/auth/mbedtls/mbedtls_config.h
@@ -86,7 +86,7 @@
 /* Memory buffer allocator options */
 #define MBEDTLS_MEMORY_ALIGN_MULTIPLE        8
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /* System headers required to build mbed TLS with the current configuration */
 #include <stdlib.h>
 #include "mbedtls/check_config.h"
diff --git a/include/drivers/cadence/cdns_uart.h b/include/drivers/cadence/cdns_uart.h
index 0a1cf77..64a062c 100644
--- a/include/drivers/cadence/cdns_uart.h
+++ b/include/drivers/cadence/cdns_uart.h
@@ -27,7 +27,7 @@
 
 #define CONSOLE_T_CDNS_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -45,6 +45,6 @@
 int console_cdns_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			  console_cdns_t *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* CDNS_UART_H */
diff --git a/include/drivers/console.h b/include/drivers/console.h
index f31de95..cada771 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -28,7 +28,7 @@
 /* Returned by console_xxx() if no registered console implements xxx. */
 #define ERROR_NO_VALID_CONSOLE		(-128)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -75,6 +75,6 @@
 /* Flush all consoles registered for the current state. */
 int console_flush(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* CONSOLE_H */
diff --git a/include/drivers/marvell/cache_llc.h b/include/drivers/marvell/cache_llc.h
index 1aa4c88..85babb8 100644
--- a/include/drivers/marvell/cache_llc.h
+++ b/include/drivers/marvell/cache_llc.h
@@ -27,7 +27,7 @@
 #define LLC_EXCLUSIVE_EN		0x100
 #define LLC_WAY_MASK			0xFFFFFFFF
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 void llc_cache_sync(int ap_index);
 void llc_flush_all(int ap_index);
 void llc_clean_all(int ap_index);
diff --git a/include/drivers/marvell/ccu.h b/include/drivers/marvell/ccu.h
index 546d9f1..b0d1ec9 100644
--- a/include/drivers/marvell/ccu.h
+++ b/include/drivers/marvell/ccu.h
@@ -10,7 +10,7 @@
 #ifndef CCU_H
 #define CCU_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <drivers/marvell/addr_map.h>
 #endif
 
@@ -36,7 +36,7 @@
 
 #define CCU_SRAM_WIN_CR				CCU_WIN_CR_OFFSET(MVEBU_AP0, 1)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 int init_ccu(int);
 void ccu_win_check(struct addr_map_win *win);
 void ccu_enable_win(int ap_index, struct addr_map_win *win, uint32_t win_id);
diff --git a/include/drivers/marvell/uart/a3700_console.h b/include/drivers/marvell/uart/a3700_console.h
index 5511d96..517f01a 100644
--- a/include/drivers/marvell/uart/a3700_console.h
+++ b/include/drivers/marvell/uart/a3700_console.h
@@ -56,7 +56,7 @@
 
 #define CONSOLE_T_A3700_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -74,6 +74,6 @@
 int console_a3700_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			   console_a3700_t *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif	/* A3700_CONSOLE_H */
diff --git a/include/drivers/meson/meson_console.h b/include/drivers/meson/meson_console.h
index 5da1e3f..70e3b0b 100644
--- a/include/drivers/meson/meson_console.h
+++ b/include/drivers/meson/meson_console.h
@@ -11,7 +11,7 @@
 
 #define CONSOLE_T_MESON_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -32,6 +32,6 @@
 int console_meson_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			   console_meson_t *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* MESON_CONSOLE_H */
diff --git a/include/drivers/renesas/rcar/console/console.h b/include/drivers/renesas/rcar/console/console.h
index 5bc10b7..0e4ed8f 100644
--- a/include/drivers/renesas/rcar/console/console.h
+++ b/include/drivers/renesas/rcar/console/console.h
@@ -9,7 +9,7 @@
 
 #define CONSOLE_T_RCAR_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -27,6 +27,6 @@
 int console_rcar_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			  console_rcar_t *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* RCAR_PRINTF_H */
diff --git a/include/drivers/st/stm32_console.h b/include/drivers/st/stm32_console.h
index b303768..a2ad87c 100644
--- a/include/drivers/st/stm32_console.h
+++ b/include/drivers/st/stm32_console.h
@@ -11,7 +11,7 @@
 
 #define CONSOLE_T_STM32_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -29,6 +29,6 @@
 int console_stm32_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			   struct console_stm32 *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* STM32_CONSOLE_H */
diff --git a/include/drivers/st/stm32_gpio.h b/include/drivers/st/stm32_gpio.h
index 4320eaf..e241f58 100644
--- a/include/drivers/st/stm32_gpio.h
+++ b/include/drivers/st/stm32_gpio.h
@@ -45,13 +45,13 @@
 #define GPIO_PULL_DOWN		0x02
 #define GPIO_PULL_MASK		U(0x03)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <stdint.h>
 
 int dt_set_pinctrl_config(int node);
 void set_gpio(uint32_t bank, uint32_t pin, uint32_t mode, uint32_t speed,
 	      uint32_t pull, uint32_t alternate, uint8_t status);
 void set_gpio_secure_cfg(uint32_t bank, uint32_t pin, bool secure);
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* STM32_GPIO_H */
diff --git a/include/drivers/ti/uart/uart_16550.h b/include/drivers/ti/uart/uart_16550.h
index 92b1ea8..32e38f0 100644
--- a/include/drivers/ti/uart/uart_16550.h
+++ b/include/drivers/ti/uart/uart_16550.h
@@ -73,7 +73,7 @@
 
 #define CONSOLE_T_16550_BASE	CONSOLE_T_DRVDATA
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
 
@@ -91,6 +91,6 @@
 int console_16550_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
 			   console_16550_t *console);
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* UART_16550_H */