Commit d5dfdeb6 authored by Julius Werner's avatar Julius Werner
Browse files

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: default avatarJulius Werner <jwerner@chromium.org>
parent f61469e5
......@@ -46,7 +46,7 @@
*/
#define CCN_GET_RUN_STATE(pstate) (pstate & 0xf)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
/*
......@@ -109,5 +109,5 @@ unsigned long long ccn_read_node_reg(node_types_t node_type,
unsigned int node_id,
unsigned int reg_offset);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* CCN_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 @@ int sds_struct_read(uint32_t structure_id, unsigned int fld_off, void *data,
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 */
......@@ -35,7 +35,7 @@
#define PSYSR_INVALID U(0xffffffff)
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -50,6 +50,6 @@ void fvp_pwrc_clr_wen(u_register_t mpidr);
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 */
......@@ -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 @@ void gicv2_clear_interrupt_pending(unsigned int id);
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 */
......@@ -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_set_interrupt_pending(unsigned int id, unsigned int proc_num);
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 */
......@@ -83,7 +83,7 @@
#define CONSOLE_T_PL011_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -101,6 +101,6 @@ typedef struct {
int console_pl011_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
console_pl011_t *console);
#endif /*__ASSEMBLY__*/
#endif /*__ASSEMBLER__*/
#endif /* PL011_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_start(uintptr_t base, unsigned int ticks);
void sp805_stop(uintptr_t base);
void sp805_refresh(uintptr_t base, unsigned int ticks);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* SP805_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 @@ static inline void tzc_disable_filters(void)
tzc400_disable_filters();
}
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* TZC400_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 @@ void tzc_dmc500_config_complete(void);
int tzc_dmc500_verify_complete(void);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* TZC_DMC500_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"
......
......@@ -27,7 +27,7 @@
#define CONSOLE_T_CDNS_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -45,6 +45,6 @@ typedef struct {
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 */
......@@ -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 @@ int console_getc(void);
/* Flush all consoles registered for the current state. */
int console_flush(void);
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* CONSOLE_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);
......
......@@ -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);
......
......@@ -56,7 +56,7 @@
#define CONSOLE_T_A3700_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -74,6 +74,6 @@ typedef struct {
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 */
......@@ -11,7 +11,7 @@
#define CONSOLE_T_MESON_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -32,6 +32,6 @@ typedef struct {
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 */
......@@ -9,7 +9,7 @@
#define CONSOLE_T_RCAR_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -27,6 +27,6 @@ typedef struct {
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 */
......@@ -11,7 +11,7 @@
#define CONSOLE_T_STM32_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -29,6 +29,6 @@ struct console_stm32 {
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 */
......@@ -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 */
......@@ -73,7 +73,7 @@
#define CONSOLE_T_16550_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <stdint.h>
......@@ -91,6 +91,6 @@ typedef struct {
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 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment