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 RCAR_PRINTF_H__
#define RCAR_PRINTF_H__
#ifndef RCAR_PRINTF_H
#define RCAR_PRINTF_H
#include <string.h>
......@@ -16,4 +16,4 @@ int32_t rcar_log_init(void);
extern uint64_t rcar_stack_generic_timer[5];
#endif
#endif
#endif /* RCAR_PRINTF_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef MICRO_DELAY_H__
#define MICRO_DELAY_H__
#ifndef MICRO_DELAY_H
#define MICRO_DELAY_H
#define TMU3_MEASUREMENT (0)
......@@ -23,4 +23,4 @@ uint32_t tcnt3_snapshot(void);
#endif
#endif
#endif /* MICRO_DELAY_H */
......@@ -10,8 +10,8 @@
*
*/
#ifndef __EMMC_CONFIG_H__
#define __EMMC_CONFIG_H__
#ifndef EMMC_CONFIG_H
#define EMMC_CONFIG_H
/* ************************ HEADER (INCLUDE) SECTION *********************** */
......@@ -36,5 +36,5 @@
/* ********************************* CODE ********************************** */
#endif /* #ifndef __EMMC_CONFIG_H__ */
#endif /* EMMC_CONFIG_H */
/* ******************************** END ************************************ */
......@@ -10,8 +10,8 @@
*
*/
#ifndef __EMMC_DEF_H__
#define __EMMC_DEF_H__
#ifndef EMMC_DEF_H
#define EMMC_DEF_H
#include "emmc_std.h"
......@@ -74,5 +74,5 @@ void emmc_write_error_info_func_no(uint16_t func_no);
/* ********************************* CODE ********************************** */
#endif /* #define __EMMC_DEF_H__ */
#endif /* EMMC_DEF_H */
/* ******************************** END ************************************ */
......@@ -10,8 +10,8 @@
*
*/
#ifndef __EMMC_HAL_H__
#define __EMMC_HAL_H__
#ifndef EMMC_HAL_H
#define EMMC_HAL_H
/* ************************ HEADER (INCLUDE) SECTION *********************** */
#include <stdint.h>
/* ***************** MACROS, CONSTANTS, COMPILATION FLAGS ****************** */
......@@ -313,6 +313,6 @@ typedef struct {
/* ********************************* CODE ********************************** */
#endif /* __EMMC_HAL_H__ */
#endif /* EMMC_HAL_H */
/* ******************************** END ************************************ */
......@@ -10,8 +10,8 @@
*
*/
#ifndef __EMMC_REGISTERS_H__
#define __EMMC_REGISTERS_H__
#ifndef EMMC_REGISTERS_H
#define EMMC_REGISTERS_H
/* ************************ HEADER (INCLUDE) SECTION *********************** */
......@@ -256,5 +256,5 @@
/* ********************************* CODE ********************************** */
#endif /* __EMMC_REGISTERS_H__ */
#endif /* EMMC_REGISTERS_H */
/* ******************************** END ************************************ */
......@@ -10,8 +10,8 @@
*
*/
#ifndef __EMMC_STD_H__
#define __EMMC_STD_H__
#ifndef EMMC_STD_H
#define EMMC_STD_H
#include "emmc_hal.h"
......@@ -471,4 +471,4 @@ uint32_t emmc_get_csd_time(void);
/* ********************************* CODE ********************************** */
/* ******************************** END ************************************ */
#endif /* __EMMC_STD_H__ */
#endif /* EMMC_STD_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IIC_DVFS_H__
#define IIC_DVFS_H__
#ifndef IIC_DVFS_H
#define IIC_DVFS_H
/* PMIC slave */
#define PMIC (0x30)
......@@ -20,4 +20,4 @@
int32_t rcar_iic_dvfs_receive(uint8_t slave, uint8_t reg, uint8_t *data);
int32_t rcar_iic_dvfs_send(uint8_t slave, uint8_t regr, uint8_t data);
#endif
#endif /* IIC_DVFS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IO_COMMON_H__
#define IO_COMMON_H__
#ifndef IO_COMMON_H
#define IO_COMMON_H
typedef struct io_drv_spec {
size_t offset;
......@@ -13,4 +13,4 @@ typedef struct io_drv_spec {
uint32_t partition;
} io_drv_spec_t;
#endif
#endif /* IO_COMMON_H */
......@@ -4,10 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IO_EMMCDRV_H__
#define IO_EMMCDRV_H__
#ifndef IO_EMMCDRV_H
#define IO_EMMCDRV_H
struct io_dev_connector;
int32_t rcar_register_io_dev_emmcdrv(const io_dev_connector_t **connector);
#endif
#endif /* IO_EMMCDRV_H */
......@@ -4,10 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IO_MEMDRV_H__
#define IO_MEMDRV_H__
#ifndef IO_MEMDRV_H
#define IO_MEMDRV_H
struct io_dev_connector;
int32_t rcar_register_io_dev_memdrv(const io_dev_connector_t **connector);
#endif
#endif /* IO_MEMDRV_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IO_PRIVATE_H_
#define IO_PRIVATE_H_
#ifndef IO_PRIVATE_H
#define IO_PRIVATE_H
/*
* Return codes reported by 'io_*' APIs
......@@ -17,4 +17,4 @@
#define IO_NOT_SUPPORTED (-0x82)
#define IO_RESOURCES_EXHAUSTED (-0x83)
#endif
#endif /* IO_PRIVATE_H */
......@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IO_RCAR_H__
#define IO_RCAR_H__
#ifndef IO_RCAR_H
#define IO_RCAR_H
int32_t rcar_register_io_dev(const io_dev_connector_t **dev_con);
int32_t rcar_get_certificate(const int32_t name, uint32_t *cert);
void rcar_read_certificate(uint64_t cert, uint32_t *size, uintptr_t *dest);
#endif
#endif /* IO_RCAR_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef RCAR_PWRC_H__
#define RCAR_PWRC_H__
#ifndef PWRC_H
#define PWRC_H
#define PPOFFR_OFF 0x0
#define PPONR_OFF 0x4
......@@ -74,4 +74,4 @@ extern uint64_t rcar_stack_generic_timer[5];
#endif
#endif
#endif /* PWRC_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef ROM_API_H__
#define ROM_API_H__
#ifndef ROM_API_H
#define ROM_API_H
#include <stdint.h>
......@@ -28,4 +28,4 @@ uint32_t rcar_rom_secure_boot_api(uint32_t *key, uint32_t *cert,
rom_read_flash_f f);
uint32_t rcar_rom_get_lcs(uint32_t *lcs);
#endif
#endif /* ROM_API_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef RPC_REGISTER_H__
#define RPC_REGISTER_H__
#ifndef RPC_REGISTERS_H
#define RPC_REGISTERS_H
#define RPC_BASE (0xEE200000U)
#define RPC_CMNCR (RPC_BASE + 0x0000U)
......@@ -22,4 +22,4 @@
#define RPC_PHYCNT (RPC_BASE + 0x007CU)
#define RPC_PHYINT (RPC_BASE + 0x0088U)
#endif
#endif /* RPC_REGISTERS_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __BOOT_INIT_DRAM_
#define __BOOT_INIT_DRAM_
#ifndef BOOT_INIT_DRAM_H
#define BOOT_INIT_DRAM_H
extern int32_t rcar_dram_init(void);
......@@ -15,4 +15,4 @@ extern int32_t rcar_dram_init(void);
#define INITDRAM_ERR_O (0xfffffffe)
#define INITDRAM_ERR_T (0xfffffff0)
#endif
#endif /* BOOT_INIT_DRAM_H */
......@@ -4,13 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef BOOT_INIT_DRAM_REGDEF_E3_H_
#define BOOT_INIT_DRAM_REGDEF_E3_H_
#ifndef BOOT_INIT_DRAM_REGDEF_E3_H
#define BOOT_INIT_DRAM_REGDEF_E3_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#define BIT0 0x00000001U
#define BIT11 0x00000800U
......@@ -111,5 +110,6 @@ extern "C" {
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* BOOT_INIT_DRAM_REGDEF_E3_H_ */
#endif /* __cplusplus */
#endif /* BOOT_INIT_DRAM_REGDEF_E3_H */
......@@ -4,11 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include <stdint.h>
#ifndef DDR_INIT_E3_H
#define DDR_INIT_E3_H
#ifndef __DDR_INIT_E3_
#define __DDR_INIT_E3_
#include <stdint.h>
#define RCAR_E3_DDR_VERSION "rev.0.09"
......@@ -31,4 +30,4 @@ extern int32_t rcar_dram_init(void);
#define INITDRAM_ERR_O (0xfffffffe)
#define INITDRAM_ERR_T (0xfffffff0)
#endif /* __DDR_INIT_E3_ */
#endif /* DDR_INIT_E3_H */
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef DRAM_SUB_FUNC_H_
#define DRAM_SUB_FUNC_H_
#ifndef DRAM_SUB_FUNC_H
#define DRAM_SUB_FUNC_H
#define DRAM_UPDATE_STATUS_ERR (-1)
#define DRAM_BOOT_STATUS_COLD (0)
......@@ -14,4 +14,4 @@
int32_t rcar_dram_update_boot_status(uint32_t status);
void rcar_dram_get_boot_status(uint32_t * status);
#endif
#endif /* DRAM_SUB_FUNC_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