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: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/include/plat/arm/board/common/board_css_def.h b/include/plat/arm/board/common/board_css_def.h
index 1a80e16..29211be 100644
--- a/include/plat/arm/board/common/board_css_def.h
+++ b/include/plat/arm/board/common/board_css_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __BOARD_CSS_DEF_H__
-#define __BOARD_CSS_DEF_H__
+#ifndef BOARD_CSS_DEF_H
+#define BOARD_CSS_DEF_H
 
 #include <common_def.h>
 #include <soc_css_def.h>
@@ -73,5 +73,4 @@
 #define PLAT_ARM_TSP_UART_BASE			V2M_IOFPGA_UART0_BASE
 #define PLAT_ARM_TSP_UART_CLK_IN_HZ		V2M_IOFPGA_UART0_CLK_IN_HZ
 
-#endif /* __BOARD_CSS_DEF_H__ */
-
+#endif /* BOARD_CSS_DEF_H */
diff --git a/include/plat/arm/common/aarch64/arm_macros.S b/include/plat/arm/common/aarch64/arm_macros.S
index 7953d7e..c2ba7db 100644
--- a/include/plat/arm/common/aarch64/arm_macros.S
+++ b/include/plat/arm/common/aarch64/arm_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ARM_MACROS_S__
-#define __ARM_MACROS_S__
+#ifndef ARM_MACROS_S
+#define ARM_MACROS_S
 
 #include <gic_common.h>
 #include <gicv2.h>
@@ -91,4 +91,4 @@
 exit_print_gic_regs:
 	.endm
 
-#endif /* __ARM_MACROS_S__ */
+#endif /* ARM_MACROS_S */
diff --git a/include/plat/arm/common/aarch64/cci_macros.S b/include/plat/arm/common/aarch64/cci_macros.S
index 52e060d..069dc85 100644
--- a/include/plat/arm/common/aarch64/cci_macros.S
+++ b/include/plat/arm/common/aarch64/cci_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __CCI_MACROS_S__
-#define __CCI_MACROS_S__
+#ifndef CCI_MACROS_S
+#define CCI_MACROS_S
 
 #include <cci.h>
 #include <platform_def.h>
@@ -34,4 +34,4 @@
 	bl	str_in_crash_buf_print
 	.endm
 
-#endif /* __CCI_MACROS_S__ */
+#endif /* CCI_MACROS_S */
diff --git a/include/plat/arm/common/arm_config.h b/include/plat/arm/common/arm_config.h
index 44610bd..4dda350 100644
--- a/include/plat/arm/common/arm_config.h
+++ b/include/plat/arm/common/arm_config.h
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ARM_CONFIG_H__
-#define __ARM_CONFIG_H__
+#ifndef ARM_CONFIG_H
+#define ARM_CONFIG_H
 
 #include <stdint.h>
 #include <utils_def.h>
@@ -39,4 +39,4 @@
 }
 
 
-#endif /* __ARM_CONFIG_H__ */
+#endif /* ARM_CONFIG_H */
diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h
index 6aa8ce8..69aae4a 100644
--- a/include/plat/arm/common/arm_spm_def.h
+++ b/include/plat/arm/common/arm_spm_def.h
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ARM_SPM_DEF_H__
-#define __ARM_SPM_DEF_H__
+#ifndef ARM_SPM_DEF_H
+#define ARM_SPM_DEF_H
 
 #include <arm_def.h>
 #include <utils_def.h>
@@ -100,4 +100,4 @@
 #define PLAT_SPM_COOKIE_0		ULL(0)
 #define PLAT_SPM_COOKIE_1		ULL(0)
 
-#endif /* __ARM_SPM_DEF_H__ */
+#endif /* ARM_SPM_DEF_H */
diff --git a/include/plat/arm/css/common/aarch64/css_macros.S b/include/plat/arm/css/common/aarch64/css_macros.S
index b669ef6..85a7044 100644
--- a/include/plat/arm/css/common/aarch64/css_macros.S
+++ b/include/plat/arm/css/common/aarch64/css_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __CSS_MACROS_S__
-#define __CSS_MACROS_S__
+#ifndef CSS_MACROS_S
+#define CSS_MACROS_S
 
 #include <arm_macros.S>
 #include <platform_def.h>
@@ -22,5 +22,4 @@
 	arm_print_gic_regs
 	.endm
 
-
-#endif /* __CSS_MACROS_S__ */
+#endif /* CSS_MACROS_S */
diff --git a/include/plat/arm/css/common/css_def.h b/include/plat/arm/css/common/css_def.h
index 3853319..4a7d314 100644
--- a/include/plat/arm/css/common/css_def.h
+++ b/include/plat/arm/css/common/css_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_DEF_H__
-#define __CSS_DEF_H__
+#ifndef CSS_DEF_H
+#define CSS_DEF_H
 
 #include <arm_def.h>
 #include <gic_common.h>
@@ -200,4 +200,4 @@
 #define CSS_CPU_PWR_STATE_OFF		0
 #define CSS_CPU_PWR_STATE(state, n)	(((state) >> (n)) & 1)
 
-#endif /* __CSS_DEF_H__ */
+#endif /* CSS_DEF_H */
diff --git a/include/plat/arm/css/common/css_pm.h b/include/plat/arm/css/common/css_pm.h
index a243671..eeb72de 100644
--- a/include/plat/arm/css/common/css_pm.h
+++ b/include/plat/arm/css/common/css_pm.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_PM_H__
-#define __CSS_PM_H__
+#ifndef CSS_PM_H
+#define CSS_PM_H
 
 #include <cdefs.h>
 #include <psci.h>
@@ -45,4 +45,4 @@
  */
 extern const uint32_t plat_css_core_pos_to_scmi_dmn_id_map[];
 
-#endif /* __CSS_PM_H__ */
+#endif /* CSS_PM_H */
diff --git a/include/plat/arm/soc/common/soc_css.h b/include/plat/arm/soc/common/soc_css.h
index 897bf2e..469928d 100644
--- a/include/plat/arm/soc/common/soc_css.h
+++ b/include/plat/arm/soc/common/soc_css.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SOC_CSS_H__
-#define __SOC_CSS_H__
+#ifndef SOC_CSS_H
+#define SOC_CSS_H
 
 /*
  * Utility functions for ARM CSS SoCs
@@ -19,5 +19,4 @@
 	soc_css_init_pcie();
 }
 
-
-#endif /* __SOC_CSS_H__ */
+#endif /* SOC_CSS_H */
diff --git a/include/plat/arm/soc/common/soc_css_def.h b/include/plat/arm/soc/common/soc_css_def.h
index 3206f4e..263313a 100644
--- a/include/plat/arm/soc/common/soc_css_def.h
+++ b/include/plat/arm/soc/common/soc_css_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SOC_CSS_DEF_H__
-#define __SOC_CSS_DEF_H__
+#ifndef SOC_CSS_DEF_H
+#define SOC_CSS_DEF_H
 
 #include <common_def.h>
 #include <utils_def.h>
@@ -84,4 +84,4 @@
 #define PLAT_ARM_SCP_TZC_DRAM1_SIZE	ULL(0x00200000)
 #endif
 
-#endif /* __SOC_CSS_DEF_H__ */
+#endif /* SOC_CSS_DEF_H */
diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
index 5d76d6e..66074ac 100644
--- a/include/plat/common/common_def.h
+++ b/include/plat/common/common_def.h
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __COMMON_DEF_H__
-#define __COMMON_DEF_H__
+#ifndef COMMON_DEF_H
+#define COMMON_DEF_H
 
 #include <bl_common.h>
 #include <platform_def.h>
@@ -83,4 +83,5 @@
 #define BL2_CODE_END		round_up(BL2_ROM_END, PAGE_SIZE)
 #endif /* BL2_IN_XIP_MEM */
 #endif /* SEPARATE_CODE_AND_RODATA */
-#endif /* __COMMON_DEF_H__ */
+
+#endif /* COMMON_DEF_H */
diff --git a/include/plat/marvell/a3700/common/armada_common.h b/include/plat/marvell/a3700/common/armada_common.h
index 9fc4634..fdcc02a 100644
--- a/include/plat/marvell/a3700/common/armada_common.h
+++ b/include/plat/marvell/a3700/common/armada_common.h
@@ -5,12 +5,12 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __ARMADA_COMMON_H__
-#define __ARMADA_COMMON_H__
+#ifndef ARMADA_COMMON_H
+#define ARMADA_COMMON_H
 
 #include <io_addr_dec.h>
 #include <stdint.h>
 
 int marvell_get_io_dec_win_conf(struct dec_win_config **win, uint32_t *size);
 
-#endif /* __ARMADA_COMMON_H__ */
+#endif /* ARMADA_COMMON_H */
diff --git a/include/plat/marvell/a3700/common/board_marvell_def.h b/include/plat/marvell/a3700/common/board_marvell_def.h
index 49a1a5c..1782596 100644
--- a/include/plat/marvell/a3700/common/board_marvell_def.h
+++ b/include/plat/marvell/a3700/common/board_marvell_def.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __BOARD_MARVELL_DEF_H__
-#define __BOARD_MARVELL_DEF_H__
+#ifndef BOARD_MARVELL_DEF_H
+#define BOARD_MARVELL_DEF_H
 
 /*
  * Required platform porting definitions common to all ARM
@@ -73,5 +73,4 @@
 
 #define PLAT_MARVELL_TRUSTED_SRAM_SIZE	0x80000	/* 512 KB */
 
-
-#endif /* __BOARD_MARVELL_DEF_H__ */
+#endif /* BOARD_MARVELL_DEF_H */
diff --git a/include/plat/marvell/a3700/common/marvell_def.h b/include/plat/marvell/a3700/common/marvell_def.h
index 6c3a524..3c105fc 100644
--- a/include/plat/marvell/a3700/common/marvell_def.h
+++ b/include/plat/marvell/a3700/common/marvell_def.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __MARVELL_DEF_H__
-#define __MARVELL_DEF_H__
+#ifndef MARVELL_DEF_H
+#define MARVELL_DEF_H
 
 #include <arch.h>
 #include <common_def.h>
@@ -174,4 +174,4 @@
 					 MARVELL_BL_RAM_SIZE)
 
 
-#endif /* __MARVELL_DEF_H__ */
+#endif /* MARVELL_DEF_H */
diff --git a/include/plat/marvell/a3700/common/plat_marvell.h b/include/plat/marvell/a3700/common/plat_marvell.h
index f733d04..8c289e9 100644
--- a/include/plat/marvell/a3700/common/plat_marvell.h
+++ b/include/plat/marvell/a3700/common/plat_marvell.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __PLAT_MARVELL_H__
-#define __PLAT_MARVELL_H__
+#ifndef PLAT_MARVELL_H
+#define PLAT_MARVELL_H
 
 #include <bl_common.h>
 #include <cassert.h>
@@ -93,4 +93,4 @@
 
 const mmap_region_t *plat_marvell_get_mmap(void);
 
-#endif /* __PLAT_MARVELL_H__ */
+#endif /* PLAT_MARVELL_H */
diff --git a/include/plat/marvell/a8k/common/armada_common.h b/include/plat/marvell/a8k/common/armada_common.h
index c1e37f5..64d9adf 100644
--- a/include/plat/marvell/a8k/common/armada_common.h
+++ b/include/plat/marvell/a8k/common/armada_common.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __ARMADA_COMMON_H__
-#define __ARMADA_COMMON_H__
+#ifndef ARMADA_COMMON_H
+#define ARMADA_COMMON_H
 
 #include <amb_adec.h>
 #include <io_win.h>
@@ -125,4 +125,4 @@
 int marvell_get_ccu_memory_map(int ap_idx, struct addr_map_win **win,
 			       uint32_t *size);
 
-#endif /* __A8K_COMMON_H__ */
+#endif /* ARMADA_COMMON_H */
diff --git a/include/plat/marvell/a8k/common/board_marvell_def.h b/include/plat/marvell/a8k/common/board_marvell_def.h
index e67543e..0da56e7 100644
--- a/include/plat/marvell/a8k/common/board_marvell_def.h
+++ b/include/plat/marvell/a8k/common/board_marvell_def.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __BOARD_MARVELL_DEF_H__
-#define __BOARD_MARVELL_DEF_H__
+#ifndef BOARD_MARVELL_DEF_H
+#define BOARD_MARVELL_DEF_H
 
 /*
  * Required platform porting definitions common to all ARM
@@ -74,4 +74,4 @@
 #define PLAT_MARVELL_TRUSTED_SRAM_SIZE	0x80000	/* 512 KB */
 
 
-#endif /* __BOARD_MARVELL_DEF_H__ */
+#endif /* BOARD_MARVELL_DEF_H */
diff --git a/include/plat/marvell/a8k/common/marvell_def.h b/include/plat/marvell/a8k/common/marvell_def.h
index 9429753..c67b3cd 100644
--- a/include/plat/marvell/a8k/common/marvell_def.h
+++ b/include/plat/marvell/a8k/common/marvell_def.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __MARVELL_DEF_H__
-#define __MARVELL_DEF_H__
+#ifndef MARVELL_DEF_H
+#define MARVELL_DEF_H
 
 #include <arch.h>
 #include <common_def.h>
@@ -178,4 +178,4 @@
 					 MARVELL_BL_RAM_SIZE)
 
 
-#endif /* __MARVELL_DEF_H__ */
+#endif /* MARVELL_DEF_H */
diff --git a/include/plat/marvell/a8k/common/plat_marvell.h b/include/plat/marvell/a8k/common/plat_marvell.h
index 2aecd3f..f062491 100644
--- a/include/plat/marvell/a8k/common/plat_marvell.h
+++ b/include/plat/marvell/a8k/common/plat_marvell.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __PLAT_MARVELL_H__
-#define __PLAT_MARVELL_H__
+#ifndef PLAT_MARVELL_H
+#define PLAT_MARVELL_H
 
 #include <cassert.h>
 #include <cpu_data.h>
@@ -127,4 +127,4 @@
 int plat_marvell_early_cpu_powerdown(void);
 int bl2_plat_handle_scp_bl2(image_info_t *scp_bl2_image_info);
 
-#endif /* __PLAT_MARVELL_H__ */
+#endif /* PLAT_MARVELL_H */
diff --git a/include/plat/marvell/a8k/common/plat_pm_trace.h b/include/plat/marvell/a8k/common/plat_pm_trace.h
index 0878959..a954914 100644
--- a/include/plat/marvell/a8k/common/plat_pm_trace.h
+++ b/include/plat/marvell/a8k/common/plat_pm_trace.h
@@ -5,9 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __PLAT_PM_TRACE_H
-#define __PLAT_PM_TRACE_H
-
+#ifndef PLAT_PM_TRACE_H
+#define PLAT_PM_TRACE_H
 
 /*
  * PM Trace is for Debug purpose only!!!
@@ -97,4 +96,4 @@
  */
 void pm_trace_add(unsigned int trace, unsigned int core);
 
-#endif /* __PLAT_PM_TRACE_H */
+#endif /* PLAT_PM_TRACE_H */
diff --git a/include/plat/marvell/common/aarch64/cci_macros.S b/include/plat/marvell/common/aarch64/cci_macros.S
index d6080cf..96b364e 100644
--- a/include/plat/marvell/common/aarch64/cci_macros.S
+++ b/include/plat/marvell/common/aarch64/cci_macros.S
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __CCI_MACROS_S__
-#define __CCI_MACROS_S__
+#ifndef CCI_MACROS_S
+#define CCI_MACROS_S
 
 #include <cci.h>
 #include <platform_def.h>
@@ -36,4 +36,4 @@
 	bl	str_in_crash_buf_print
 	.endm
 
-#endif /* __CCI_MACROS_S__ */
+#endif /* CCI_MACROS_S */
diff --git a/include/plat/marvell/common/aarch64/marvell_macros.S b/include/plat/marvell/common/aarch64/marvell_macros.S
index faf1070..c2a8bd0 100644
--- a/include/plat/marvell/common/aarch64/marvell_macros.S
+++ b/include/plat/marvell/common/aarch64/marvell_macros.S
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __MARVELL_MACROS_S__
-#define __MARVELL_MACROS_S__
+#ifndef MARVELL_MACROS_S
+#define MARVELL_MACROS_S
 
 #include <cci.h>
 #include <gic_common.h>
@@ -131,4 +131,4 @@
 	.endm
 
 
-#endif /* __MARVELL_MACROS_S__ */
+#endif /* MARVELL_MACROS_S */
diff --git a/include/plat/marvell/common/marvell_plat_priv.h b/include/plat/marvell/common/marvell_plat_priv.h
index c1dad0e..6f0b588 100644
--- a/include/plat/marvell/common/marvell_plat_priv.h
+++ b/include/plat/marvell/common/marvell_plat_priv.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef __MARVELL_PLAT_PRIV_H__
-#define __MARVELL_PLAT_PRIV_H__
+#ifndef MARVELL_PLAT_PRIV_H
+#define MARVELL_PLAT_PRIV_H
 
 #include <utils.h>
 
@@ -31,4 +31,4 @@
 void plat_marvell_gic_irq_pcpu_save(void);
 void plat_marvell_gic_irq_pcpu_restore(void);
 
-#endif /* __MARVELL_PLAT_PRIV_H__ */
+#endif /* MARVELL_PLAT_PRIV_H */
diff --git a/include/plat/marvell/common/marvell_pm.h b/include/plat/marvell/common/marvell_pm.h
index 2817a46..8f16607 100644
--- a/include/plat/marvell/common/marvell_pm.h
+++ b/include/plat/marvell/common/marvell_pm.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef _MARVELL_PM_H_
-#define _MARVELL_PM_H_
+#ifndef MARVELL_PM_H
+#define MARVELL_PM_H
 
 #define MVEBU_MAILBOX_MAGIC_NUM		PLAT_MARVELL_MAILBOX_MAGIC_NUM
 #define MVEBU_MAILBOX_SUSPEND_STATE	0xb007de7c
@@ -23,4 +23,4 @@
 /* BLE execution start counter value */
 #define	MBOX_IDX_START_CNT		4
 
-#endif /* _MARVELL_PM_H_ */
+#endif /* MARVELL_PM_H */
diff --git a/include/plat/marvell/common/mvebu.h b/include/plat/marvell/common/mvebu.h
index a7d6c3f..35a0200 100644
--- a/include/plat/marvell/common/mvebu.h
+++ b/include/plat/marvell/common/mvebu.h
@@ -5,8 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#ifndef _MVEBU_H_
-#define _MVEBU_H_
+#ifndef MVEBU_H
+#define MVEBU_H
 
 /* Use this functions only when printf is allowed */
 #define debug_enter()	VERBOSE("----> Enter %s\n", __func__)
@@ -36,4 +36,4 @@
 #define _1GB_				(_1MB_ * 1024ULL)
 #define _2GB_				(2 * _1GB_)
 
-#endif	/* MVEBU_H */
+#endif /* MVEBU_H */