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 __UNIPHIER_H__
#define __UNIPHIER_H__
#ifndef UNIPHIER_H
#define UNIPHIER_H
#include <stdint.h>
#include <string.h>
......@@ -88,4 +88,4 @@ unsigned int uniphier_calc_core_pos(u_register_t mpidr);
#define UNIPHIER_IMAGE_BUF_SIZE ((UNIPHIER_NS_DRAM_LIMIT) - \
(UNIPHIER_IMAGE_BUF_BASE))
#endif /* __UNIPHIER_H__ */
#endif /* UNIPHIER_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __BOOT_API_H
#define __BOOT_API_H
#ifndef BOOT_API_H
#define BOOT_API_H
#include <stdint.h>
#include <stdio.h>
......@@ -235,4 +235,4 @@ typedef struct {
uint8_t binary_type;
} __packed boot_api_image_header_t;
#endif /* __BOOT_API_H */
#endif /* BOOT_API_H */
......@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __STM32MP1_CONTEXT_H__
#define __STM32MP1_CONTEXT_H__
#ifndef STM32MP1_CONTEXT_H
#define STM32MP1_CONTEXT_H
#include <stdint.h>
int stm32_save_boot_interface(uint32_t interface, uint32_t instance);
#endif /* __STM32MP1_CONTEXT_H__ */
#endif /* STM32MP1_CONTEXT_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __STM32MP1_DT_H__
#define __STM32MP1_DT_H__
#ifndef STM32MP1_DT_H
#define STM32MP1_DT_H
#include <stdbool.h>
......@@ -38,4 +38,4 @@ int dt_get_stdout_node_offset(void);
uint32_t dt_get_ddr_size(void);
const char *dt_get_board_model(void);
#endif /* __STM32MP1_DT_H__ */
#endif /* STM32MP1_DT_H */
......@@ -4,8 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __STM32MP1_PRIVATE_H__
#define __STM32MP1_PRIVATE_H__
#ifndef STM32MP1_PRIVATE_H
#define STM32MP1_PRIVATE_H
#include <stdint.h>
void stm32mp1_io_setup(void);
void configure_mmu(void);
......@@ -19,4 +21,4 @@ uintptr_t stm32mp1_get_boot_ctx_address(void);
void stm32mp1_gic_pcpu_init(void);
void stm32mp1_gic_init(void);
#endif /* __STM32MP1_PRIVATE_H__ */
#endif /* STM32MP1_PRIVATE_H */
......@@ -4,8 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __STM32MP1_LD_S__
#define __STM32MP1_LD_S__
#ifndef STM32MP1_LD_S
#define STM32MP1_LD_S
#include <platform_def.h>
#include <xlat_tables_defs.h>
......@@ -73,4 +74,4 @@ SECTIONS
__TF_END__ = .;
}
#endif /*__STM32MP1_LD_S__*/
#endif /* STM32MP1_LD_S */
......@@ -7,8 +7,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef K3_SEC_PROXY_H
#define K3_SEC_PROXY_H
#ifndef SEC_PROXY_H
#define SEC_PROXY_H
#include <stdint.h>
......@@ -55,4 +55,4 @@ int k3_sec_proxy_send(enum k3_sec_proxy_chan_id id, const struct k3_sec_proxy_ms
*/
int k3_sec_proxy_recv(enum k3_sec_proxy_chan_id id, struct k3_sec_proxy_msg *msg);
#endif /* K3_SEC_PROXY_H */
#endif /* SEC_PROXY_H */
......@@ -7,8 +7,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __TI_SCI_H
#define __TI_SCI_H
#ifndef TI_SCI_H
#define TI_SCI_H
#include <stdint.h>
#include <stdbool.h>
......@@ -205,4 +205,4 @@ int ti_sci_proc_get_boot_status(uint8_t proc_id, uint64_t *bv,
*/
int ti_sci_init(void);
#endif /* __TI_SCI_H */
#endif /* TI_SCI_H */
......@@ -10,8 +10,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __TI_SCI_PROTOCOL_H
#define __TI_SCI_PROTOCOL_H
#ifndef TI_SCI_PROTOCOL_H
#define TI_SCI_PROTOCOL_H
#include <stdint.h>
......@@ -647,4 +647,4 @@ struct ti_sci_msg_resp_get_proc_boot_status {
uint32_t status_flags;
} __packed;
#endif /* __TI_SCI_PROTOCOL_H */
#endif /* TI_SCI_PROTOCOL_H */
......@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __K3_CONSOLE_H__
#define __K3_CONSOLE_H__
#ifndef K3_CONSOLE_H
#define K3_CONSOLE_H
void bl31_console_setup(void);
#endif /* __K3_CONSOLE_H__ */
#endif /* K3_CONSOLE_H */
......@@ -4,8 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __K3_GICV3_H__
#define __K3_GICV3_H__
#ifndef K3_GICV3_H
#define K3_GICV3_H
#include <stdint.h>
void k3_gic_driver_init(uintptr_t gicd_base, uintptr_t gicr_base);
void k3_gic_init(void);
......@@ -13,4 +15,4 @@ void k3_gic_cpuif_enable(void);
void k3_gic_cpuif_disable(void);
void k3_gic_pcpu_init(void);
#endif /* __K3_GICV3_H__ */
#endif /* K3_GICV3_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PLAT_MACROS_S__
#define __PLAT_MACROS_S__
#ifndef PLAT_MACROS_S
#define PLAT_MACROS_S
/* ---------------------------------------------
* The below required platform porting macro
......@@ -18,4 +18,4 @@
/* STUB */
.endm
#endif /* __PLAT_MACROS_S__ */
#endif /* PLAT_MACROS_S */
......@@ -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 <board_def.h>
......@@ -206,4 +206,4 @@
#define TI_SCI_HOST_ID 10
#define TI_SCI_MAX_MESSAGE_SIZE 52
#endif /* __PLATFORM_DEF_H__ */
#endif /* PLATFORM_DEF_H */
......@@ -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 <cci_macros.S>
......@@ -25,4 +25,4 @@
print_cci_regs
.endm
#endif /* __PLAT_MACROS_S__ */
#endif /* PLAT_MACROS_S */
......@@ -6,8 +6,8 @@
/* ZynqMP IPI mailbox doorbell service enums and defines */
#ifndef _IPI_MAILBOX_SVC_H_
#define _IPI_MAILBOX_SVC_H_
#ifndef IPI_MAILBOX_SVC_H
#define IPI_MAILBOX_SVC_H
#include <stdint.h>
......@@ -36,4 +36,4 @@ uint64_t ipi_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2,
uint64_t x3, uint64_t x4, void *cookie, void *handle,
uint64_t flags);
#endif /* _IPI_MAILBOX_SVC_H_ */
#endif /* IPI_MAILBOX_SVC_H */
......@@ -8,8 +8,8 @@
* ZynqMP system level PM-API functions for clock control.
*/
#ifndef _PM_API_CLOCK_H_
#define _PM_API_CLOCK_H_
#ifndef PM_API_CLOCK_H
#define PM_API_CLOCK_H
#include <utils_def.h>
#include "pm_common.h"
......@@ -313,4 +313,4 @@ enum pm_ret_status pm_api_clk_set_pll_frac_data(unsigned int pll,
enum pm_ret_status pm_api_clk_get_pll_frac_data(unsigned int pll,
unsigned int *data);
#endif /* _PM_API_CLOCK_H_ */
#endif /* PM_API_CLOCK_H */
......@@ -8,8 +8,8 @@
* ZynqMP system level PM-API functions for pin control.
*/
#ifndef _PM_API_IOCTL_H_
#define _PM_API_IOCTL_H_
#ifndef PM_API_IOCTL_H
#define PM_API_IOCTL_H
#include "pm_common.h"
......@@ -80,4 +80,4 @@ enum pm_ret_status pm_api_ioctl(enum pm_node_id nid,
unsigned int arg1,
unsigned int arg2,
unsigned int *value);
#endif /* _PM_API_IOCTL_H_ */
#endif /* PM_API_IOCTL_H */
......@@ -8,8 +8,8 @@
* ZynqMP system level PM-API functions for pin control.
*/
#ifndef _PM_API_PINCTRL_H_
#define _PM_API_PINCTRL_H_
#ifndef PM_API_PINCTRL_H
#define PM_API_PINCTRL_H
#include "pm_common.h"
......@@ -731,4 +731,4 @@ enum pm_ret_status pm_api_pinctrl_get_num_pins(unsigned int *npins);
enum pm_ret_status pm_api_pinctrl_get_num_functions(unsigned int *nfuncs);
enum pm_ret_status pm_api_pinctrl_get_num_func_groups(unsigned int fid,
unsigned int *ngroups);
#endif /* _PM_API_PINCTRL_H_ */
#endif /* PM_API_PINCTRL_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _PM_API_SYS_H_
#define _PM_API_SYS_H_
#ifndef PM_API_SYS_H
#define PM_API_SYS_H
#include <stdint.h>
#include "pm_defs.h"
......@@ -176,4 +176,4 @@ enum pm_ret_status pm_aes_engine(uint32_t address_high,
uint32_t address_low,
uint32_t *value);
#endif /* _PM_API_SYS_H_ */
#endif /* PM_API_SYS_H */
......@@ -9,8 +9,8 @@
* the execution environment.
*/
#ifndef _PM_CLIENT_H_
#define _PM_CLIENT_H_
#ifndef PM_CLIENT_H
#define PM_CLIENT_H
#include "pm_common.h"
#include "pm_defs.h"
......@@ -25,4 +25,4 @@ enum pm_ret_status pm_set_suspend_mode(uint32_t mode);
/* Global variables to be set in pm_client.c */
extern const struct pm_proc *primary_proc;
#endif /* _PM_CLIENT_H_ */
#endif /* PM_CLIENT_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