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/plat/arm/board/fvp/fvp_private.h b/plat/arm/board/fvp/fvp_private.h
index 16f10a2..e7dea99 100644
--- a/plat/arm/board/fvp/fvp_private.h
+++ b/plat/arm/board/fvp/fvp_private.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __FVP_PRIVATE_H__
-#define __FVP_PRIVATE_H__
+#ifndef FVP_PRIVATE_H
+#define FVP_PRIVATE_H
 
 #include <plat_arm.h>
 
@@ -21,4 +21,4 @@
 void tsp_early_platform_setup(void);
 
 
-#endif /* __FVP_PRIVATE_H__ */
+#endif /* FVP_PRIVATE_H */
diff --git a/plat/arm/board/fvp/include/plat.ld.S b/plat/arm/board/fvp/include/plat.ld.S
index f2a3ea6..ad2d46c 100644
--- a/plat/arm/board/fvp/include/plat.ld.S
+++ b/plat/arm/board/fvp/include/plat.ld.S
@@ -3,10 +3,10 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __PLAT_LD_S__
-#define __PLAT_LD_S__
+#ifndef PLAT_LD_S
+#define PLAT_LD_S
 
 #include <arm_tzc_dram.ld.S>
 #include <arm_reclaim_init.ld.S>
 
-#endif /* __PLAT_LD_S__ */
+#endif /* PLAT_LD_S */
diff --git a/plat/arm/board/fvp/include/plat_macros.S b/plat/arm/board/fvp/include/plat_macros.S
index 4dcde2d..6be8b09 100644
--- a/plat/arm/board/fvp/include/plat_macros.S
+++ b/plat/arm/board/fvp/include/plat_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __PLAT_MACROS_S__
-#define __PLAT_MACROS_S__
+#ifndef PLAT_MACROS_S
+#define PLAT_MACROS_S
 
 #include <arm_macros.S>
 #include <v2m_def.h>
@@ -40,4 +40,4 @@
 	arm_print_gic_regs
 	.endm
 
-#endif /* __PLAT_MACROS_S__ */
+#endif /* PLAT_MACROS_S */
diff --git a/plat/arm/board/juno/include/plat_macros.S b/plat/arm/board/juno/include/plat_macros.S
index 0dd96c4..ec94a4f 100644
--- a/plat/arm/board/juno/include/plat_macros.S
+++ b/plat/arm/board/juno/include/plat_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __PLAT_MACROS_S__
-#define __PLAT_MACROS_S__
+#ifndef PLAT_MACROS_S
+#define PLAT_MACROS_S
 
 #include <cci_macros.S>
 #include <css_macros.S>
@@ -21,4 +21,4 @@
 	print_cci_regs
 	.endm
 
-#endif /* __PLAT_MACROS_S__ */
+#endif /* PLAT_MACROS_S */
diff --git a/plat/arm/board/juno/juno_decl.h b/plat/arm/board/juno/juno_decl.h
index 8a3b373..cd87c3b 100644
--- a/plat/arm/board/juno/juno_decl.h
+++ b/plat/arm/board/juno/juno_decl.h
@@ -4,9 +4,9 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __JUNO_DECL_H__
-#define __JUNO_DECL_H__
+#ifndef JUNO_DECL_H
+#define JUNO_DECL_H
 
 int juno_getentropy(void *buf, size_t len);
 
-#endif /* __JUNO_DECL_H__ */
+#endif /* JUNO_DECL_H */
diff --git a/plat/arm/board/juno/juno_tzmp1_def.h b/plat/arm/board/juno/juno_tzmp1_def.h
index 7055f76..5d0978c 100644
--- a/plat/arm/board/juno/juno_tzmp1_def.h
+++ b/plat/arm/board/juno/juno_tzmp1_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __JUNO_TZMP1_DEF_H__
-#define __JUNO_TZMP1_DEF_H__
+#ifndef JUNO_TZMP1_DEF_H
+#define JUNO_TZMP1_DEF_H
 
 #include <plat_arm.h>
 
@@ -82,4 +82,4 @@
 /* config to PROTCTRL register */
 #define V550_PROTCTRL_CONFIG		0xa8700000
 
-#endif /* __JUNO_TZMP1_DEF_H__ */
+#endif /* JUNO_TZMP1_DEF_H */
diff --git a/plat/arm/board/n1sdp/include/plat_macros.S b/plat/arm/board/n1sdp/include/plat_macros.S
index fe9a66c..521bcc3 100644
--- a/plat/arm/board/n1sdp/include/plat_macros.S
+++ b/plat/arm/board/n1sdp/include/plat_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __PLAT_MACROS_S__
-#define __PLAT_MACROS_S__
+#ifndef PLAT_MACROS_S
+#define PLAT_MACROS_S
 
 #include <css_macros.S>
 
@@ -20,4 +20,5 @@
  */
 	.macro plat_crash_print_regs
 	.endm
-#endif /* __PLAT_MACROS_S__ */
+
+#endif /* PLAT_MACROS_S */
diff --git a/plat/arm/board/n1sdp/include/platform_def.h b/plat/arm/board/n1sdp/include/platform_def.h
index d26f559..3e48397 100644
--- a/plat/arm/board/n1sdp/include/platform_def.h
+++ b/plat/arm/board/n1sdp/include/platform_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __PLATFORM_DEF_H__
-#define __PLATFORM_DEF_H__
+#ifndef PLATFORM_DEF_H
+#define PLATFORM_DEF_H
 
 #include <arm_def.h>
 #include <board_css_def.h>
@@ -68,4 +68,5 @@
 
 /* Platform ID address */
 #define SSC_VERSION				(SSC_REG_BASE + SSC_VERSION_OFFSET)
-#endif /* __PLATFORM_DEF_H__ */
+
+#endif /* PLATFORM_DEF_H */
diff --git a/plat/arm/board/sgm775/include/platform_def.h b/plat/arm/board/sgm775/include/platform_def.h
index babe093..8a3431b 100644
--- a/plat/arm/board/sgm775/include/platform_def.h
+++ b/plat/arm/board/sgm775/include/platform_def.h
@@ -4,12 +4,12 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __PLATFORM_DEF_H__
-#define __PLATFORM_DEF_H__
+#ifndef PLATFORM_DEF_H
+#define PLATFORM_DEF_H
 
 #include <sgm_base_platform_def.h>
 
 #define PLAT_MAX_CPUS_PER_CLUSTER	8
 #define PLAT_MAX_PE_PER_CPU		1
 
-#endif /* __PLATFORM_DEF_H__ */
+#endif /* PLATFORM_DEF_H */
diff --git a/plat/arm/css/drivers/mhu/css_mhu.h b/plat/arm/css/drivers/mhu/css_mhu.h
index 0fb00c7..ff04ae4 100644
--- a/plat/arm/css/drivers/mhu/css_mhu.h
+++ b/plat/arm/css/drivers/mhu/css_mhu.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_MHU_H__
-#define __CSS_MHU_H__
+#ifndef CSS_MHU_H
+#define CSS_MHU_H
 
 #include <stdint.h>
 
@@ -16,4 +16,4 @@
 
 void mhu_secure_init(void);
 
-#endif	/* __CSS_MHU_H__ */
+#endif /* CSS_MHU_H */
diff --git a/plat/arm/css/drivers/scmi/scmi.h b/plat/arm/css/drivers/scmi/scmi.h
index 7f89229..e1358bf 100644
--- a/plat/arm/css/drivers/scmi/scmi.h
+++ b/plat/arm/css/drivers/scmi/scmi.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_SCMI_H__
-#define __CSS_SCMI_H__
+#ifndef SCMI_H
+#define SCMI_H
 
 #include <bakery_lock.h>
 #include <stddef.h>
@@ -162,4 +162,4 @@
 /* API to get the platform specific SCMI channel information. */
 scmi_channel_plat_info_t *plat_css_get_scmi_info();
 
-#endif	/* __CSS_SCMI_H__ */
+#endif /* SCMI_H */
diff --git a/plat/arm/css/drivers/scmi/scmi_private.h b/plat/arm/css/drivers/scmi/scmi_private.h
index 39bc8cc..a4f4179 100644
--- a/plat/arm/css/drivers/scmi/scmi_private.h
+++ b/plat/arm/css/drivers/scmi/scmi_private.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_SCMI_PRIVATE_H__
-#define __CSS_SCMI_PRIVATE_H__
+#ifndef SCMI_PRIVATE_H
+#define SCMI_PRIVATE_H
 
 /*
  * SCMI power domain management protocol message and response lengths. It is
@@ -150,4 +150,4 @@
 	assert(ch->info && ch->info->scmi_mbx_mem);
 }
 
-#endif	/* __CSS_SCMI_PRIVATE_H__ */
+#endif /* SCMI_PRIVATE_H */
diff --git a/plat/arm/css/drivers/scp/css_scp.h b/plat/arm/css/drivers/scp/css_scp.h
index 44dfbca..84c1487 100644
--- a/plat/arm/css/drivers/scp/css_scp.h
+++ b/plat/arm/css/drivers/scp/css_scp.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_SCP_H__
-#define __CSS_SCP_H__
+#ifndef CSS_SCP_H
+#define CSS_SCP_H
 
 #include <cassert.h>
 #include <platform_def.h>
@@ -47,4 +47,4 @@
 CASSERT(SCP_BL2U_BASE >= ARM_TB_FW_CONFIG_LIMIT, assert_scp_bl2u_overflow);
 #endif
 
-#endif	/* __CSS_SCP_H__ */
+#endif /* CSS_SCP_H */
diff --git a/plat/arm/css/drivers/scpi/css_scpi.h b/plat/arm/css/drivers/scpi/css_scpi.h
index 2a7e624..68fc60a 100644
--- a/plat/arm/css/drivers/scpi/css_scpi.h
+++ b/plat/arm/css/drivers/scpi/css_scpi.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __CSS_SCPI_H__
-#define __CSS_SCPI_H__
+#ifndef CSS_SCPI_H
+#define CSS_SCPI_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -106,5 +106,4 @@
 		unsigned int *cluster_state_p);
 uint32_t scpi_sys_power_state(scpi_system_state_t system_state);
 
-
-#endif	/* __CSS_SCPI_H__ */
+#endif /* CSS_SCPI_H */
diff --git a/plat/arm/css/drivers/sds/sds.h b/plat/arm/css/drivers/sds/sds.h
index 4aef0df..114ae92 100644
--- a/plat/arm/css/drivers/sds/sds.h
+++ b/plat/arm/css/drivers/sds/sds.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SDS_H__
-#define __SDS_H__
+#ifndef SDS_H
+#define SDS_H
 
 /* SDS Structure Identifier defines */
 /* AP CPU INFO defines */
@@ -86,4 +86,5 @@
 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 /* __SDS_H__ */
+
+#endif /* SDS_H */
diff --git a/plat/arm/css/drivers/sds/sds_private.h b/plat/arm/css/drivers/sds/sds_private.h
index 43b97f6..2101dd0 100644
--- a/plat/arm/css/drivers/sds/sds_private.h
+++ b/plat/arm/css/drivers/sds/sds_private.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SDS_PRIVATE_H__
-#define __SDS_PRIVATE_H__
+#ifndef SDS_PRIVATE_H
+#define SDS_PRIVATE_H
 
 /* SDS Header defines */
 #define SDS_HEADER_ID_SHIFT			0
@@ -96,4 +96,5 @@
 #define GET_SDS_REGION_SIZE(region)		((((region_desc_t *)(region))->reg[1]))
 
 #endif /* __ASSEMBLY__ */
-#endif /* __SDS_PRIVATE_H__ */
+
+#endif /* SDS_PRIVATE_H */
diff --git a/plat/arm/css/sgi/include/plat_macros.S b/plat/arm/css/sgi/include/plat_macros.S
index fe9a66c..521bcc3 100644
--- a/plat/arm/css/sgi/include/plat_macros.S
+++ b/plat/arm/css/sgi/include/plat_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __PLAT_MACROS_S__
-#define __PLAT_MACROS_S__
+#ifndef PLAT_MACROS_S
+#define PLAT_MACROS_S
 
 #include <css_macros.S>
 
@@ -20,4 +20,5 @@
  */
 	.macro plat_crash_print_regs
 	.endm
-#endif /* __PLAT_MACROS_S__ */
+
+#endif /* PLAT_MACROS_S */
diff --git a/plat/arm/css/sgi/include/sgi_ras.h b/plat/arm/css/sgi/include/sgi_ras.h
index b307b9c..a449eae 100644
--- a/plat/arm/css/sgi/include/sgi_ras.h
+++ b/plat/arm/css/sgi/include/sgi_ras.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SGI_RAS__
-#define __SGI_RAS__
+#ifndef SGI_RAS_H
+#define SGI_RAS_H
 
 /*
  * Mapping the RAS interrupt with SDEI event number and the event
@@ -19,4 +19,4 @@
 
 int sgi_ras_intr_handler_setup(void);
 
-#endif /* __SGI_RAS__ */
+#endif /* SGI_RAS_H */
diff --git a/plat/arm/css/sgm/include/plat_macros.S b/plat/arm/css/sgm/include/plat_macros.S
index d877ef8..715ded2 100644
--- a/plat/arm/css/sgm/include/plat_macros.S
+++ b/plat/arm/css/sgm/include/plat_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __PLAT_MACROS_S__
-#define __PLAT_MACROS_S__
+#ifndef PLAT_MACROS_S
+#define PLAT_MACROS_S
 
 #include <cci_macros.S>
 #include <css_macros.S>
@@ -21,4 +21,4 @@
 print_cci_regs
 .endm
 
-#endif /* __PLAT_MACROS_S__ */
+#endif /* PLAT_MACROS_S */
diff --git a/plat/arm/css/sgm/include/sgm_base_platform_def.h b/plat/arm/css/sgm/include/sgm_base_platform_def.h
index eaba619..a9795a4 100644
--- a/plat/arm/css/sgm/include/sgm_base_platform_def.h
+++ b/plat/arm/css/sgm/include/sgm_base_platform_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SGM_BASE_PLATFORM_DEF_H__
-#define __SGM_BASE_PLATFORM_DEF_H__
+#ifndef SGM_BASE_PLATFORM_DEF_H
+#define SGM_BASE_PLATFORM_DEF_H
 
 #include <arm_def.h>
 #include <board_css_def.h>
@@ -239,4 +239,4 @@
  */
 #define PLAT_ARM_MEM_PROT_ADDR		(V2M_FLASH0_BASE + \
 					 V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
-#endif /* __SGM_BASE_PLATFORM_DEF_H__ */
+#endif /* SGM_BASE_PLATFORM_DEF_H */
diff --git a/plat/arm/css/sgm/include/sgm_plat_config.h b/plat/arm/css/sgm/include/sgm_plat_config.h
index 75abeff..79e6b5c 100644
--- a/plat/arm/css/sgm/include/sgm_plat_config.h
+++ b/plat/arm/css/sgm/include/sgm_plat_config.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SGM_PLAT_CONFIG_H__
-#define __SGM_PLAT_CONFIG_H__
+#ifndef SGM_PLAT_CONFIG_H
+#define SGM_PLAT_CONFIG_H
 
 #include <ccn.h>
 #include <gicv3.h>
@@ -39,4 +39,5 @@
 
 void plat_config_init(void);
 css_plat_config_t *get_plat_config(void);
-#endif /* __SGM_PLAT_CONFIG_H__ */
+
+#endif /* SGM_PLAT_CONFIG_H */
diff --git a/plat/arm/css/sgm/include/sgm_variant.h b/plat/arm/css/sgm/include/sgm_variant.h
index a0a91b0..859ddb5 100644
--- a/plat/arm/css/sgm/include/sgm_variant.h
+++ b/plat/arm/css/sgm/include/sgm_variant.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __SGM_VARIANT_H__
-#define __SGM_VARIANT_H__
+#ifndef SGM_VARIANT_H
+#define SGM_VARIANT_H
 
 /* SSC_VERSION values for sgm */
 #define SGM775_SSC_VER_PART_NUM		0x0790
@@ -14,4 +14,4 @@
 #define SGM_DMC_SIZE			0x40000
 #define SGM775_DMC_COUNT		4
 
-#endif /* __SGM_VARIANT_H__ */
+#endif /* SGM_VARIANT_H */