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 __SOC_H__
#define __SOC_H__
#ifndef SOC_H
#define SOC_H
#include <utils.h>
......@@ -281,4 +281,4 @@ void set_pmu_rsthold(void);
void pmu_sgrf_rst_hld(void);
__pmusramfunc void pmu_sgrf_rst_hld_release(void);
__pmusramfunc void restore_pmu_rsthold(void);
#endif /* __SOC_H__ */
#endif /* SOC_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __ROCKCHIP_RK3399_INCLUDE_ADDRESSMAP_H__
#define __ROCKCHIP_RK3399_INCLUDE_ADDRESSMAP_H__
#ifndef ADDRESSMAP_H
#define ADDRESSMAP_H
#include <addressmap_shared.h>
......@@ -16,4 +16,4 @@
#define DEV_RNG0_BASE MMIO_BASE
#define DEV_RNG0_SIZE SIZE_M(125)
#endif /* __ROCKCHIP_RK3399_INCLUDE_ADDRESSMAP_H__ */
#endif /* ADDRESSMAP_H */
......@@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __ROCKCHIP_PLAT_LD_S__
#define __ROCKCHIP_PLAT_LD_S__
#ifndef ROCKCHIP_PLAT_LD_S
#define ROCKCHIP_PLAT_LD_S
#include <xlat_tables_defs.h>
......@@ -95,4 +95,4 @@ SECTIONS
} >PMUSRAM
}
#endif /* __ROCKCHIP_PLAT_LD_S__ */
#endif /* ROCKCHIP_PLAT_LD_S */
......@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PLAT_SIP_CALLS_H__
#define __PLAT_SIP_CALLS_H__
#ifndef PLAT_SIP_CALLS_H
#define PLAT_SIP_CALLS_H
#define RK_PLAT_SIP_NUM_CALLS 0
#endif /* __PLAT_SIP_CALLS_H__ */
#endif /* PLAT_SIP_CALLS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __ROCKCHIP_RK3399_INCLUDE_SHARED_ADDRESSMAP_SHARED_H__
#define __ROCKCHIP_RK3399_INCLUDE_SHARED_ADDRESSMAP_SHARED_H__
#ifndef ADDRESSMAP_SHARED_H
#define ADDRESSMAP_SHARED_H
#define SIZE_K(n) ((n) * 1024)
#define SIZE_M(n) ((n) * 1024 * 1024)
......@@ -101,4 +101,4 @@
#define MSCH_BASE(ch) (SERVICE_NOC_1_BASE + (ch) * 0x8000)
#endif /* __ROCKCHIP_RK3399_INCLUDE_SHARED_ADDRESSMAP_SHARED_H__ */
#endif /* ADDRESSMAP_SHARED_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PLAT_ROCKCHIP_RK3399_INCLUDE_SHARED_BL31_PARAM_H__
#define __PLAT_ROCKCHIP_RK3399_INCLUDE_SHARED_BL31_PARAM_H__
#ifndef BL31_PARAM_H
#define BL31_PARAM_H
/*******************************************************************************
* Platform memory map related constants
......@@ -18,9 +18,9 @@
* BL31 specific defines.
******************************************************************************/
/*
* Put BL3-1 at the top of the Trusted RAM
* Put BL31 at the top of the Trusted RAM
*/
#define BL31_BASE (TZRAM_BASE + 0x1000)
#define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE)
#endif /*__PLAT_ROCKCHIP_RK3399_INCLUDE_SHARED_BL31_PARAM_H__*/
#endif /* BL31_PARAM_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __DRAM_REGS_H__
#define __DRAM_REGS_H__
#ifndef DRAM_REGS_H
#define DRAM_REGS_H
#define CTL_REG_NUM 332
#define PHY_REG_NUM 959
......@@ -97,4 +97,4 @@
#define DDR_STRIDE(n) mmio_write_32(SGRF_BASE + SGRF_SOC_CON3_7(4), \
(0x1f<<(10+16))|((n)<<10))
#endif /* __DRAM_REGS_H__ */
#endif /* DRAM_REGS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __M0_PARAM_H__
#define __M0_PARAM_H__
#ifndef M0_PARAM_H
#define M0_PARAM_H
#define PARAM_ADDR 0xc0
......@@ -22,4 +22,4 @@
#define PARAM_M0_SIZE 0x28
#define M0_DONE_FLAG 0xf59ec39a
#endif /*__M0_PARAM_H__*/
#endif /* M0_PARAM_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __ROCKCHIP_RK3399_INCLUDE_SHARED_MISC_REGS_H__
#define __ROCKCHIP_RK3399_INCLUDE_SHARED_MISC_REGS_H__
#ifndef MISC_REGS_H
#define MISC_REGS_H
/* CRU */
#define CRU_DPLL_CON0 0x40
......@@ -24,4 +24,4 @@
/* PMU CRU */
#define PMU_CRU_GATEDIS_CON0 0x130
#endif /* __ROCKCHIP_RK3399_INCLUDE_SHARED_MISC_REGS_H__ */
#endif /* MISC_REGS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PMU_BITS_H__
#define __PMU_BITS_H__
#ifndef PMU_BITS_H
#define PMU_BITS_H
enum pmu_powerdomain_id {
PD_CPUL0 = 0,
......@@ -694,4 +694,4 @@ enum pmu_core_pwr_st {
STANDBY_BY_WFIL2_CLUSTER_B,
};
#endif /* __PMU_BITS_H__ */
#endif /* PMU_BITS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PMU_REGS_H__
#define __PMU_REGS_H__
#ifndef PMU_REGS_H
#define PMU_REGS_H
#define PMU_WKUP_CFG0 0x00
#define PMU_WKUP_CFG1 0x04
......@@ -145,4 +145,4 @@
#define GRF_GPIO4C_P 0xe068
#define GRF_GPIO4D_P 0xe06C
#endif /* __PMU_REGS_H__ */
#endif /* PMU_REGS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PLAT_DEF_H__
#define __PLAT_DEF_H__
#ifndef RK3399_DEF_H
#define RK3399_DEF_H
#include <addressmap.h>
......@@ -62,4 +62,4 @@
INTR_PROP_DESC(ARM_IRQ_SEC_SGI_6, GIC_HIGHEST_SEC_PRIORITY, \
INTR_GROUP0, GIC_INTR_CFG_LEVEL)
#endif /* __PLAT_DEF_H__ */
#endif /* RK3399_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 <arch.h>
#include <common_def.h>
......@@ -236,4 +236,4 @@
*/
#define SYS_COUNTER_FREQ_IN_TICKS ULL(19200000)
#endif /* __PLATFORM_DEF_H__ */
#endif /* PLATFORM_DEF_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __RPI3_HW__
#define __RPI3_HW__
#ifndef RPI3_HW_H
#define RPI3_HW_H
#include <utils_def.h>
......@@ -95,4 +95,4 @@
#define RPI3_INTC_PENDING_FIQ_OFFSET ULL(0x00000070)
#define RPI3_INTC_PENDING_FIQ_MBOX3 ULL(0x00000080)
#endif /* __RPI3_HW__ */
#endif /* RPI3_HW_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __RPI3_PRIVATE_H__
#define __RPI3_PRIVATE_H__
#ifndef RPI3_PRIVATE_H
#define RPI3_PRIVATE_H
#include <stdint.h>
......@@ -39,4 +39,4 @@ void rpi3_rng_read(void *buf, size_t len);
/* VideoCore firmware commands */
int rpi3_vc_hardware_get_board_revision(uint32_t *revision);
#endif /*__RPI3_PRIVATE_H__ */
#endif /* RPI3_PRIVATE_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SQ_MHU_H__
#define __SQ_MHU_H__
#ifndef SQ_MHU_H
#define SQ_MHU_H
#include <stdint.h>
......@@ -16,4 +16,4 @@ void mhu_secure_message_end(unsigned int slot_id);
void mhu_secure_init(void);
#endif /* __SQ_MHU_H__ */
#endif /* SQ_MHU_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SQ_SCPI_H__
#define __SQ_SCPI_H__
#ifndef SQ_SCPI_H
#define SQ_SCPI_H
#include <stddef.h>
#include <stdint.h>
......@@ -79,4 +79,4 @@ extern void scpi_set_sq_power_state(unsigned int mpidr,
scpi_power_state_t css_state);
uint32_t scpi_sys_power_state(scpi_system_state_t system_state);
#endif /* __SQ_SCPI_H__ */
#endif /* SQ_SCPI_H */
......@@ -4,12 +4,13 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PLAT_MACROS_S__
#define __PLAT_MACROS_S__
#ifndef PLAT_MACROS_S
#define PLAT_MACROS_S
/*
* Print CCN registers
*/
.macro plat_crash_print_regs
.endm
#endif /* __PLAT_MACROS_S__ */
#endif /* PLAT_MACROS_S */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SQ_COMMON_H__
#define __SQ_COMMON_H__
#ifndef SQ_COMMON_H
#define SQ_COMMON_H
#include <stdint.h>
#include <xlat_tables_v2.h>
......@@ -40,4 +40,4 @@ void sq_gic_pcpu_init(void);
void sq_mmap_setup(uintptr_t total_base, size_t total_size,
const struct mmap_region *mmap);
#endif /* __SQ_COMMON_H__ */
#endif /* SQ_COMMON_H */
......@@ -4,10 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PLAT_MACROS_S__
#define __PLAT_MACROS_S__
#ifndef PLAT_MACROS_S
#define PLAT_MACROS_S
.macro plat_crash_print_regs
.endm
#endif /* __PLAT_MACROS_S__ */
#endif /* PLAT_MACROS_S */
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