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 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __BL1_PRIVATE_H__
#define __BL1_PRIVATE_H__
#ifndef BL1_PRIVATE_H
#define BL1_PRIVATE_H
#include <stdint.h>
#include <utils_def.h>
......@@ -35,4 +35,4 @@ register_t bl1_fwu_smc_handler(unsigned int smc_fid,
void *cookie,
void *handle,
unsigned int flags);
#endif /* __BL1_PRIVATE_H__ */
#endif /* BL1_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __BL2_PRIVATE_H__
#define __BL2_PRIVATE_H__
#ifndef BL2_PRIVATE_H
#define BL2_PRIVATE_H
#if BL2_IN_XIP_MEM
/*******************************************************************************
......@@ -33,4 +33,4 @@ void bl2_arch_setup(void);
struct entry_point_info *bl2_load_images(void);
void bl2_run_next_image(const struct entry_point_info *bl_ep_info);
#endif /* __BL2_PRIVATE_H__ */
#endif /* BL2_PRIVATE_H */
......@@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SP_MIN_H__
#define __SP_MIN_H__
#ifndef SP_MIN_PRIVATE_H
#define SP_MIN_PRIVATE_H
void sp_min_warm_entrypoint(void);
void sp_min_main(void);
void sp_min_warm_boot(void);
void sp_min_fiq(void);
#endif /* __SP_MIN_H__ */
#endif /* SP_MIN_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __TSP_PRIVATE_H__
#define __TSP_PRIVATE_H__
#ifndef TSP_PRIVATE_H
#define TSP_PRIVATE_H
/* Definitions to help the assembler access the SMC/ERET args structure */
#define TSP_ARGS_SIZE 0x40
......@@ -149,5 +149,4 @@ tsp_args_t *tsp_system_off_main(uint64_t arg0,
uint64_t tsp_main(void);
#endif /* __ASSEMBLY__ */
#endif /* __TSP_PRIVATE_H__ */
#endif /* TSP_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __CCN_PRIVATE_H__
#define __CCN_PRIVATE_H__
#ifndef CCN_PRIVATE_H
#define CCN_PRIVATE_H
/*
* A CCN implementation can have a maximum of 64 Request nodes with node IDs
......@@ -230,4 +230,4 @@ static inline unsigned int count_set_bits(unsigned long long bitmap)
#define CCN_GET_HN_NODEID_MAP(periphbase, mn_hn_id_reg_offset) \
ccn_reg_read(periphbase, MN_REGION_ID, mn_hn_id_reg_offset)
#endif /* __CCN_PRIVATE_H__ */
#endif /* CCN_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef GIC_COMMON_PRIVATE_H_
#define GIC_COMMON_PRIVATE_H_
#ifndef GIC_COMMON_PRIVATE_H
#define GIC_COMMON_PRIVATE_H
#include <gic_common.h>
#include <mmio.h>
......@@ -85,4 +85,4 @@ void gicd_set_icactiver(uintptr_t base, unsigned int id);
void gicd_set_ipriorityr(uintptr_t base, unsigned int id, unsigned int pri);
void gicd_set_icfgr(uintptr_t base, unsigned int id, unsigned int cfg);
#endif /* GIC_COMMON_PRIVATE_H_ */
#endif /* GIC_COMMON_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __GICV2_PRIVATE_H__
#define __GICV2_PRIVATE_H__
#ifndef GICV2_PRIVATE_H
#define GICV2_PRIVATE_H
#include <gicv2.h>
#include <mmio.h>
......@@ -146,4 +146,4 @@ static inline void gicc_write_dir(uintptr_t base, unsigned int val)
mmio_write_32(base + GICC_DIR, val);
}
#endif /* __GICV2_PRIVATE_H__ */
#endif /* GICV2_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __GICV3_PRIVATE_H__
#define __GICV3_PRIVATE_H__
#ifndef GICV3_PRIVATE_H
#define GICV3_PRIVATE_H
#include <assert.h>
#include <gic_common.h>
......@@ -387,4 +387,4 @@ static inline void gits_wait_for_quiescent_bit(uintptr_t gits_base)
}
#endif /* __GICV3_PRIVATE_H__ */
#endif /* GICV3_PRIVATE_H */
......@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __IMX_GPT_H__
#define __IMX_GPT_H__
#ifndef IMX_GPT_H
#define IMX_GPT_H
#include <stdint.h>
void imx_gpt_ops_init(uintptr_t reg_base);
#endif /* __IMX_GPT_H__ */
#endif /* IMX_GPT_H */
......@@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __IMX_CONSOLE_H__
#define __IMX_CONSOLE_H__
#ifndef IMX_UART_H
#define IMX_UART_H
#define IMX_UART_RXD_OFFSET 0x00
#define IMX_UART_RXD_CHARRDY BIT(15)
......@@ -150,4 +150,4 @@
#define IMX_UART_TS_RXFULL BIT(3)
#define IMX_UART_TS_SOFTRST BIT(0)
#endif /* __IMX_UART_H__ */
#endif /* IMX_UART_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __IMX_USDHC_H__
#define __IMX_USDHC_H__
#ifndef IMX_USDHC_H
#define IMX_USDHC_H
#include <mmc.h>
......@@ -134,4 +134,4 @@ void imx_usdhc_init(imx_usdhc_params_t *params,
#define mmio_clrbits32(addr, clear) mmio_write_32(addr, mmio_read_32(addr) & ~(clear))
#define mmio_setbits32(addr, set) mmio_write_32(addr, mmio_read_32(addr) | (set))
#endif /* __IMX_USDHC_H__ */
#endif /* IMX_USDHC_H */
......@@ -7,8 +7,8 @@
/* Driver for COMPHY unit that is part or Marvell A8K SoCs */
#ifndef _COMPHY_H_
#define _COMPHY_H_
#ifndef COMPHY_H
#define COMPHY_H
/* COMPHY registers */
#define COMMON_PHY_CFG1_REG 0x0
......@@ -469,5 +469,4 @@
#define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_MASK \
(0xFF << HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET)
#endif /* _COMPHY_H_ */
#endif /* COMPHY_H */
......@@ -7,8 +7,8 @@
/* Marvell CP110 SoC COMPHY unit driver */
#ifndef _PHY_COMPHY_CP110_H
#define _PHY_COMPHY_CP110_H
#ifndef COMPHY_CP110_H
#define COMPHY_CP110_H
#define SD_ADDR(base, lane) (base + 0x1000 * lane)
#define HPIPE_ADDR(base, lane) (SD_ADDR(base, lane) + 0x800)
......@@ -862,5 +862,4 @@
/* General defines */
#define PLL_LOCK_TIMEOUT 15000
#endif /* _PHY_COMPHY_CP110_H */
#endif /* COMPHY_CP110_H */
......@@ -5,8 +5,8 @@
* https://spdx.org/licenses
*/
#ifndef _PHY_COMPHY_3700_H
#define _PHY_COMPHY_3700_H
#ifndef PHY_COMPHY_3700_H
#define PHY_COMPHY_3700_H
#define PLL_SET_DELAY_US 600
#define COMPHY_PLL_TIMEOUT 1000
......@@ -255,4 +255,4 @@ enum {
int mvebu_3700_comphy_is_pll_locked(uint8_t comphy_index, uint32_t comphy_mode);
int mvebu_3700_comphy_power_off(uint8_t comphy_index, uint32_t comphy_mode);
int mvebu_3700_comphy_power_on(uint8_t comphy_index, uint32_t comphy_mode);
#endif /* _PHY_COMPHY_3700_H */
#endif /* PHY_COMPHY_3700_H */
......@@ -7,8 +7,8 @@
/* Marvell CP110 ana A3700 common */
#ifndef _PHY_COMPHY_COMMON_H
#define _PHY_COMPHY_COMMON_H
#ifndef PHY_COMPHY_COMMON_H
#define PHY_COMPHY_COMMON_H
/* #define DEBUG_COMPHY */
#ifdef DEBUG_COMPHY
......@@ -153,4 +153,4 @@ static inline void __unused reg_set16(uintptr_t addr, uint16_t data,
debug("new val 0x%x\n", mmio_read_16(addr));
}
#endif /* _PHY_COMPHY_COMMON_H */
#endif /* PHY_COMPHY_COMMON_H */
......@@ -5,8 +5,8 @@
* https://spdx.org/licenses
*/
#ifndef __PHY_DEFAULT_PORTING_LAYER_H
#define __PHY_DEFAULT_PORTING_LAYER_H
#ifndef PHY_DEFAULT_PORTING_LAYER_H
#define PHY_DEFAULT_PORTING_LAYER_H
#define MAX_LANE_NR 6
......@@ -48,4 +48,4 @@ static const struct sata_params
.valid = 0x1
},
};
#endif /* __PHY_DEFAULT_PORTING_LAYER_H */
#endif /* PHY_DEFAULT_PORTING_LAYER_H */
......@@ -5,8 +5,8 @@
* https://spdx.org/licenses
*/
#ifndef _MC_TRUSTZONE_H
#define _MC_TRUSTZONE_H
#ifndef MC_TRUSTZONE_H
#define MC_TRUSTZONE_H
#include <addr_map.h>
......@@ -24,4 +24,4 @@
void tz_enable_win(int ap_index, const struct addr_map_win *win, int win_id);
#endif /* _MC_TRUSTZONE_H */
#endif /* MC_TRUSTZONE_H */
......@@ -5,8 +5,8 @@
* https://spdx.org/licenses
*/
#ifndef __A3700_CONSOLE_H__
#define __A3700_CONSOLE_H__
#ifndef A3700_CONSOLE_H
#define A3700_CONSOLE_H
/* MVEBU UART Registers */
#define UART_RX_REG 0x00
......@@ -52,4 +52,4 @@
#define UART_CTRL_TXFIFO_RESET (1 << 15)
#define UARTLSR_TXFIFOEMPTY (1 << 6)
#endif /* __A3700_CONSOLE_H__ */
#endif /* A3700_CONSOLE_H */
......@@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef AVS_DRIVER_H__
#define AVS_DRIVER_H__
#ifndef AVS_DRIVER_H
#define AVS_DRIVER_H
/* AVS Setting. 1:enable / 0:disable */
#ifndef AVS_SETTING_ENABLE
......@@ -17,4 +17,4 @@ void rcar_avs_init(void);
void rcar_avs_setting(void);
void rcar_avs_end(void);
#endif /* AVS_DRIVER_H__ */
#endif /* AVS_DRIVER_H */
......@@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef BOARD_H_
#define BOARD_H_
#ifndef BOARD_H
#define BOARD_H
#define BOARD_SALVATOR_X (0x00)
#define BOARD_KRIEK (0x01)
......@@ -32,4 +32,4 @@ extern const char *g_board_tbl[];
int32_t rcar_get_board_type(uint32_t *type, uint32_t *rev);
#endif
#endif /* BOARD_H */
Supports Markdown
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