Commit c3cf06f1 authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

Standardise header guards across codebase



All identifiers, regardless of use, that start with two underscores are
reserved. This means they can't be used in header guards.

The style that this project is now to use the full name of the file in
capital letters followed by 'H'. For example, for a file called
"uart_example.h", the header guard is UART_EXAMPLE_H.

The exceptions are files that are imported from other projects:

- CryptoCell driver
- dt-bindings folders
- zlib headers

Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent f5ae1b0e
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SOC_CSS_H__ #ifndef SOC_CSS_H
#define __SOC_CSS_H__ #define SOC_CSS_H
/* /*
* Utility functions for ARM CSS SoCs * Utility functions for ARM CSS SoCs
...@@ -19,5 +19,4 @@ static inline void soc_css_security_setup(void) ...@@ -19,5 +19,4 @@ static inline void soc_css_security_setup(void)
soc_css_init_pcie(); soc_css_init_pcie();
} }
#endif /* SOC_CSS_H */
#endif /* __SOC_CSS_H__ */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SOC_CSS_DEF_H__ #ifndef SOC_CSS_DEF_H
#define __SOC_CSS_DEF_H__ #define SOC_CSS_DEF_H
#include <common_def.h> #include <common_def.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -84,4 +84,4 @@ ...@@ -84,4 +84,4 @@
#define PLAT_ARM_SCP_TZC_DRAM1_SIZE ULL(0x00200000) #define PLAT_ARM_SCP_TZC_DRAM1_SIZE ULL(0x00200000)
#endif #endif
#endif /* __SOC_CSS_DEF_H__ */ #endif /* SOC_CSS_DEF_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __COMMON_DEF_H__ #ifndef COMMON_DEF_H
#define __COMMON_DEF_H__ #define COMMON_DEF_H
#include <bl_common.h> #include <bl_common.h>
#include <platform_def.h> #include <platform_def.h>
...@@ -83,4 +83,5 @@ ...@@ -83,4 +83,5 @@
#define BL2_CODE_END round_up(BL2_ROM_END, PAGE_SIZE) #define BL2_CODE_END round_up(BL2_ROM_END, PAGE_SIZE)
#endif /* BL2_IN_XIP_MEM */ #endif /* BL2_IN_XIP_MEM */
#endif /* SEPARATE_CODE_AND_RODATA */ #endif /* SEPARATE_CODE_AND_RODATA */
#endif /* __COMMON_DEF_H__ */
#endif /* COMMON_DEF_H */
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __ARMADA_COMMON_H__ #ifndef ARMADA_COMMON_H
#define __ARMADA_COMMON_H__ #define ARMADA_COMMON_H
#include <io_addr_dec.h> #include <io_addr_dec.h>
#include <stdint.h> #include <stdint.h>
int marvell_get_io_dec_win_conf(struct dec_win_config **win, uint32_t *size); int marvell_get_io_dec_win_conf(struct dec_win_config **win, uint32_t *size);
#endif /* __ARMADA_COMMON_H__ */ #endif /* ARMADA_COMMON_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __BOARD_MARVELL_DEF_H__ #ifndef BOARD_MARVELL_DEF_H
#define __BOARD_MARVELL_DEF_H__ #define BOARD_MARVELL_DEF_H
/* /*
* Required platform porting definitions common to all ARM * Required platform porting definitions common to all ARM
...@@ -73,5 +73,4 @@ ...@@ -73,5 +73,4 @@
#define PLAT_MARVELL_TRUSTED_SRAM_SIZE 0x80000 /* 512 KB */ #define PLAT_MARVELL_TRUSTED_SRAM_SIZE 0x80000 /* 512 KB */
#endif /* BOARD_MARVELL_DEF_H */
#endif /* __BOARD_MARVELL_DEF_H__ */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __MARVELL_DEF_H__ #ifndef MARVELL_DEF_H
#define __MARVELL_DEF_H__ #define MARVELL_DEF_H
#include <arch.h> #include <arch.h>
#include <common_def.h> #include <common_def.h>
...@@ -174,4 +174,4 @@ ...@@ -174,4 +174,4 @@
MARVELL_BL_RAM_SIZE) MARVELL_BL_RAM_SIZE)
#endif /* __MARVELL_DEF_H__ */ #endif /* MARVELL_DEF_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __PLAT_MARVELL_H__ #ifndef PLAT_MARVELL_H
#define __PLAT_MARVELL_H__ #define PLAT_MARVELL_H
#include <bl_common.h> #include <bl_common.h>
#include <cassert.h> #include <cassert.h>
...@@ -93,4 +93,4 @@ void plat_marvell_interconnect_enter_coherency(void); ...@@ -93,4 +93,4 @@ void plat_marvell_interconnect_enter_coherency(void);
const mmap_region_t *plat_marvell_get_mmap(void); const mmap_region_t *plat_marvell_get_mmap(void);
#endif /* __PLAT_MARVELL_H__ */ #endif /* PLAT_MARVELL_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __ARMADA_COMMON_H__ #ifndef ARMADA_COMMON_H
#define __ARMADA_COMMON_H__ #define ARMADA_COMMON_H
#include <amb_adec.h> #include <amb_adec.h>
#include <io_win.h> #include <io_win.h>
...@@ -125,4 +125,4 @@ int marvell_get_iob_memory_map(struct addr_map_win **win, ...@@ -125,4 +125,4 @@ int marvell_get_iob_memory_map(struct addr_map_win **win,
int marvell_get_ccu_memory_map(int ap_idx, struct addr_map_win **win, int marvell_get_ccu_memory_map(int ap_idx, struct addr_map_win **win,
uint32_t *size); uint32_t *size);
#endif /* __A8K_COMMON_H__ */ #endif /* ARMADA_COMMON_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __BOARD_MARVELL_DEF_H__ #ifndef BOARD_MARVELL_DEF_H
#define __BOARD_MARVELL_DEF_H__ #define BOARD_MARVELL_DEF_H
/* /*
* Required platform porting definitions common to all ARM * Required platform porting definitions common to all ARM
...@@ -74,4 +74,4 @@ ...@@ -74,4 +74,4 @@
#define PLAT_MARVELL_TRUSTED_SRAM_SIZE 0x80000 /* 512 KB */ #define PLAT_MARVELL_TRUSTED_SRAM_SIZE 0x80000 /* 512 KB */
#endif /* __BOARD_MARVELL_DEF_H__ */ #endif /* BOARD_MARVELL_DEF_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __MARVELL_DEF_H__ #ifndef MARVELL_DEF_H
#define __MARVELL_DEF_H__ #define MARVELL_DEF_H
#include <arch.h> #include <arch.h>
#include <common_def.h> #include <common_def.h>
...@@ -178,4 +178,4 @@ ...@@ -178,4 +178,4 @@
MARVELL_BL_RAM_SIZE) MARVELL_BL_RAM_SIZE)
#endif /* __MARVELL_DEF_H__ */ #endif /* MARVELL_DEF_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __PLAT_MARVELL_H__ #ifndef PLAT_MARVELL_H
#define __PLAT_MARVELL_H__ #define PLAT_MARVELL_H
#include <cassert.h> #include <cassert.h>
#include <cpu_data.h> #include <cpu_data.h>
...@@ -127,4 +127,4 @@ void marvell_exit_bootrom(uintptr_t base); ...@@ -127,4 +127,4 @@ void marvell_exit_bootrom(uintptr_t base);
int plat_marvell_early_cpu_powerdown(void); int plat_marvell_early_cpu_powerdown(void);
int bl2_plat_handle_scp_bl2(image_info_t *scp_bl2_image_info); int bl2_plat_handle_scp_bl2(image_info_t *scp_bl2_image_info);
#endif /* __PLAT_MARVELL_H__ */ #endif /* PLAT_MARVELL_H */
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __PLAT_PM_TRACE_H #ifndef PLAT_PM_TRACE_H
#define __PLAT_PM_TRACE_H #define PLAT_PM_TRACE_H
/* /*
* PM Trace is for Debug purpose only!!! * PM Trace is for Debug purpose only!!!
...@@ -97,4 +96,4 @@ extern core_trace_func funcTbl[PLATFORM_CORE_COUNT]; ...@@ -97,4 +96,4 @@ extern core_trace_func funcTbl[PLATFORM_CORE_COUNT];
*/ */
void pm_trace_add(unsigned int trace, unsigned int core); void pm_trace_add(unsigned int trace, unsigned int core);
#endif /* __PLAT_PM_TRACE_H */ #endif /* PLAT_PM_TRACE_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __CCI_MACROS_S__ #ifndef CCI_MACROS_S
#define __CCI_MACROS_S__ #define CCI_MACROS_S
#include <cci.h> #include <cci.h>
#include <platform_def.h> #include <platform_def.h>
...@@ -36,4 +36,4 @@ cci_iface_regs: ...@@ -36,4 +36,4 @@ cci_iface_regs:
bl str_in_crash_buf_print bl str_in_crash_buf_print
.endm .endm
#endif /* __CCI_MACROS_S__ */ #endif /* CCI_MACROS_S */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __MARVELL_MACROS_S__ #ifndef MARVELL_MACROS_S
#define __MARVELL_MACROS_S__ #define MARVELL_MACROS_S
#include <cci.h> #include <cci.h>
#include <gic_common.h> #include <gic_common.h>
...@@ -131,4 +131,4 @@ cci_iface_regs: ...@@ -131,4 +131,4 @@ cci_iface_regs:
.endm .endm
#endif /* __MARVELL_MACROS_S__ */ #endif /* MARVELL_MACROS_S */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef __MARVELL_PLAT_PRIV_H__ #ifndef MARVELL_PLAT_PRIV_H
#define __MARVELL_PLAT_PRIV_H__ #define MARVELL_PLAT_PRIV_H
#include <utils.h> #include <utils.h>
...@@ -31,4 +31,4 @@ void plat_marvell_gic_irq_restore(void); ...@@ -31,4 +31,4 @@ void plat_marvell_gic_irq_restore(void);
void plat_marvell_gic_irq_pcpu_save(void); void plat_marvell_gic_irq_pcpu_save(void);
void plat_marvell_gic_irq_pcpu_restore(void); void plat_marvell_gic_irq_pcpu_restore(void);
#endif /* __MARVELL_PLAT_PRIV_H__ */ #endif /* MARVELL_PLAT_PRIV_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef _MARVELL_PM_H_ #ifndef MARVELL_PM_H
#define _MARVELL_PM_H_ #define MARVELL_PM_H
#define MVEBU_MAILBOX_MAGIC_NUM PLAT_MARVELL_MAILBOX_MAGIC_NUM #define MVEBU_MAILBOX_MAGIC_NUM PLAT_MARVELL_MAILBOX_MAGIC_NUM
#define MVEBU_MAILBOX_SUSPEND_STATE 0xb007de7c #define MVEBU_MAILBOX_SUSPEND_STATE 0xb007de7c
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
/* BLE execution start counter value */ /* BLE execution start counter value */
#define MBOX_IDX_START_CNT 4 #define MBOX_IDX_START_CNT 4
#endif /* _MARVELL_PM_H_ */ #endif /* MARVELL_PM_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef _MVEBU_H_ #ifndef MVEBU_H
#define _MVEBU_H_ #define MVEBU_H
/* Use this functions only when printf is allowed */ /* Use this functions only when printf is allowed */
#define debug_enter() VERBOSE("----> Enter %s\n", __func__) #define debug_enter() VERBOSE("----> Enter %s\n", __func__)
...@@ -36,4 +36,4 @@ ...@@ -36,4 +36,4 @@
#define _1GB_ (_1MB_ * 1024ULL) #define _1GB_ (_1MB_ * 1024ULL)
#define _2GB_ (2 * _1GB_) #define _2GB_ (2 * _1GB_)
#endif /* MVEBU_H */ #endif /* MVEBU_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ARM_ARCH_SVC_H__ #ifndef ARM_ARCH_SVC_H
#define __ARM_ARCH_SVC_H__ #define ARM_ARCH_SVC_H
#define SMCCC_VERSION U(0x80000000) #define SMCCC_VERSION U(0x80000000)
#define SMCCC_ARCH_FEATURES U(0x80000001) #define SMCCC_ARCH_FEATURES U(0x80000001)
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
#define SMCCC_ARCH_NOT_REQUIRED -2 #define SMCCC_ARCH_NOT_REQUIRED -2
#endif /* __ARM_ARCH_SVC_H__ */ #endif /* ARM_ARCH_SVC_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __MM_SVC_H__ #ifndef MM_SVC_H
#define __MM_SVC_H__ #define MM_SVC_H
#include <utils_def.h> #include <utils_def.h>
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
#define MM_COMMUNICATE_AARCH64 U(0xC4000041) #define MM_COMMUNICATE_AARCH64 U(0xC4000041)
#define MM_COMMUNICATE_AARCH32 U(0x84000041) #define MM_COMMUNICATE_AARCH32 U(0x84000041)
#endif /* __MM_SVC_H__ */ #endif /* MM_SVC_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SECURE_PARTITION_H__ #ifndef SECURE_PARTITION_H
#define __SECURE_PARTITION_H__ #define SECURE_PARTITION_H
#include <stdint.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -46,4 +46,4 @@ typedef struct secure_partition_boot_info { ...@@ -46,4 +46,4 @@ typedef struct secure_partition_boot_info {
secure_partition_mp_info_t *mp_info; secure_partition_mp_info_t *mp_info;
} secure_partition_boot_info_t; } secure_partition_boot_info_t;
#endif /* __SECURE_PARTITION_H__ */ #endif /* SECURE_PARTITION_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