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
......@@ -6,8 +6,8 @@
/* Helper functions to offer easier navigation of Device Tree Blob */
#ifndef __FDT_WRAPPERS__
#define __FDT_WRAPPERS__
#ifndef FDT_WRAPPERS_H
#define FDT_WRAPPERS_H
/* Number of cells, given total length in bytes. Each cell is 4 bytes long */
#define NCELLS(len) ((len) / 4U)
......@@ -21,4 +21,4 @@ int fdtw_read_string(const void *dtb, int node, const char *prop,
int fdtw_write_inplace_cells(void *dtb, int node, const char *prop,
unsigned int cells, void *value);
#endif /* __FDT_WRAPPERS__ */
#endif /* FDT_WRAPPERS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __IMAGE_DECOMPRESS_H__
#define __IMAGE_DECOMPRESS_H__
#ifndef IMAGE_DECOMPRESS_H
#define IMAGE_DECOMPRESS_H
#include <stddef.h>
#include <stdint.h>
......@@ -21,4 +21,4 @@ void image_decompress_init(uintptr_t buf_base, uint32_t buf_size,
void image_decompress_prepare(struct image_info *info);
int image_decompress(struct image_info *info);
#endif /* __IMAGE_DECOMPRESS_H___ */
#endif /* IMAGE_DECOMPRESS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __INTERRUPT_PROPS_H__
#define __INTERRUPT_PROPS_H__
#ifndef INTERRUPT_PROPS_H
#define INTERRUPT_PROPS_H
#ifndef __ASSEMBLY__
......@@ -26,4 +26,4 @@ typedef struct interrupt_prop {
} interrupt_prop_t;
#endif /* __ASSEMBLY__ */
#endif /* __INTERRUPT_PROPS_H__ */
#endif /* INTERRUPT_PROPS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PARAM_HEADER_H__
#define __PARAM_HEADER_H__
#ifndef PARAM_HEADER_H
#define PARAM_HEADER_H
#include <stdbool.h>
#include <utils_def.h>
......@@ -54,5 +54,4 @@ typedef struct param_header {
#endif /*__ASSEMBLY__*/
#endif /* __PARAM_HEADER_H__ */
#endif /* PARAM_HEADER_H */
......@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef ROMLIB_H_
#ifndef ROMLIB_H
#define ROMLIB_H
#define ROMLIB_MAJOR 0
#define ROMLIB_MINOR 1
......@@ -12,4 +13,4 @@
int rom_lib_init(int version);
#endif
#endif /* ROMLIB_H */
......@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __COT_DEF_H__
#define __COT_DEF_H__
#ifndef COT_DEF_H
#define COT_DEF_H
/* TBBR CoT definitions */
#define COT_MAX_VERIFIED_PARAMS 4
#endif /* __COT_DEF_H__ */
#endif /* COT_DEF_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __TBBR_IMG_DEF_H__
#define __TBBR_IMG_DEF_H__
#ifndef TBBR_IMG_DEF_H
#define TBBR_IMG_DEF_H
#include <utils_def.h>
......@@ -86,4 +86,4 @@
/* Define size of the array */
#define MAX_NUMBER_IDS U(30)
#endif /* __TBBR_IMG_DEF_H__ */
#endif /* TBBR_IMG_DEF_H */
......@@ -17,4 +17,4 @@ int rsb_assign_runtime_address(uint16_t hw_addr, uint8_t rt_addr);
int rsb_read(uint8_t rt_addr, uint8_t reg_addr);
int rsb_write(uint8_t rt_addr, uint8_t reg_addr, uint8_t value);
#endif
#endif /* SUNXI_RSB_H */
......@@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __ARM_GICV3_COMMON_H__
#define __ARM_GICV3_COMMON_H__
#ifndef ARM_GICV3_COMMON_H
#define ARM_GICV3_COMMON_H
/*******************************************************************************
* GIC500/GIC600 Re-distributor interface registers & constants
......@@ -17,4 +17,4 @@
#define WAKER_SL_BIT (1U << WAKER_SL_SHIFT)
#define WAKER_QSC_BIT (1U << WAKER_QSC_SHIFT)
#endif /* __ARM_GICV3_COMMON_H__ */
#endif /* ARM_GICV3_COMMON_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __CCI_H__
#define __CCI_H__
#ifndef CCI_H
#define CCI_H
#include <utils_def.h>
......@@ -122,4 +122,4 @@ void cci_enable_snoop_dvm_reqs(unsigned int master_id);
void cci_disable_snoop_dvm_reqs(unsigned int master_id);
#endif /* __ASSEMBLY__ */
#endif /* __CCI_H__ */
#endif /* CCI_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __CCN_H__
#define __CCN_H__
#ifndef CCN_H
#define CCN_H
/*
* This macro defines the maximum number of master interfaces that reside on
......@@ -93,4 +93,4 @@ unsigned int ccn_get_l3_run_mode(void);
int ccn_get_part0_id(uintptr_t periphbase);
#endif /* __ASSEMBLY__ */
#endif /* __CCN_H__ */
#endif /* CCN_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __GIC_COMMON_H__
#define __GIC_COMMON_H__
#ifndef GIC_COMMON_H
#define GIC_COMMON_H
#include <utils_def.h>
......@@ -100,4 +100,4 @@
(GIC_HIGHEST_NS_PRIORITY << 16) | \
(GIC_HIGHEST_NS_PRIORITY << 24))
#endif /* __GIC_COMMON_H__ */
#endif /* GIC_COMMON_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __GICV2_H__
#define __GICV2_H__
#ifndef GICV2_H
#define GICV2_H
#include <gic_common.h>
......@@ -184,4 +184,4 @@ unsigned int gicv2_set_pmr(unsigned int mask);
void gicv2_interrupt_set_cfg(unsigned int id, unsigned int cfg);
#endif /* __ASSEMBLY__ */
#endif /* __GICV2_H__ */
#endif /* GICV2_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __GICV3_H__
#define __GICV3_H__
#ifndef GICV3_H
#define GICV3_H
/*******************************************************************************
* GICv3 miscellaneous definitions
......@@ -405,4 +405,4 @@ void gicv3_clear_interrupt_pending(unsigned int id, unsigned int proc_num);
unsigned int gicv3_set_pmr(unsigned int mask);
#endif /* __ASSEMBLY__ */
#endif /* __GICV3_H__ */
#endif /* GICV3_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __NIC_400_H__
#define __NIC_400_H__
#ifndef NIC_400_H
#define NIC_400_H
/*
* Address of slave 'n' security setting in the NIC-400 address region
......@@ -13,4 +13,4 @@
*/
#define NIC400_ADDR_CTRL_SECURITY_REG(n) (0x8 + (n) * 4)
#endif /* __NIC_400_H__ */
#endif /* NIC_400_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PL011_H__
#define __PL011_H__
#ifndef PL011_H
#define PL011_H
#include <console.h>
......@@ -103,4 +103,4 @@ int console_pl011_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
#endif /*__ASSEMBLY__*/
#endif /* __PL011_H__ */
#endif /* PL011_H */
......@@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PL061_GPIO_H__
#define __PL061_GPIO_H__
#ifndef PL061_GPIO_H
#define PL061_GPIO_H
#include <gpio.h>
void pl061_gpio_register(uintptr_t base_addr, int gpio_dev);
void pl061_gpio_init(void);
#endif /* __PL061_GPIO_H__ */
#endif /* PL061_GPIO_H */
......@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SMMU_V3_H__
#define __SMMU_V3_H__
#ifndef SMMU_V3_H
#define SMMU_V3_H
#include <utils_def.h>
#include <stdint.h>
#include <utils_def.h>
/* SMMUv3 register offsets from device base */
#define SMMU_S_IDR1 U(0x8004)
......@@ -24,4 +24,4 @@
int smmuv3_init(uintptr_t smmu_base);
#endif /* __SMMU_V3_H__ */
#endif /* SMMU_V3_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SP804_DELAY_TIMER_H__
#define __SP804_DELAY_TIMER_H__
#ifndef SP804_DELAY_TIMER_H
#define SP804_DELAY_TIMER_H
#include <delay_timer.h>
#include <stdint.h>
......@@ -25,4 +25,4 @@ void sp804_timer_ops_init(uintptr_t base_addr, const timer_ops_t *ops);
sp804_timer_ops_init((base_addr), &sp804_timer_ops); \
} while (0)
#endif /* __SP804_DELAY_TIMER_H__ */
#endif /* SP804_DELAY_TIMER_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __AUTH_COMMON_H__
#define __AUTH_COMMON_H__
#ifndef AUTH_COMMON_H
#define AUTH_COMMON_H
/*
* Authentication framework common types
......@@ -117,4 +117,4 @@ typedef struct auth_method_desc_s {
.len = (unsigned int)_len \
}
#endif /* __AUTH_COMMON_H__ */
#endif /* AUTH_COMMON_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