Unverified Commit 9d068f66 authored by Antonio Niño Díaz's avatar Antonio Niño Díaz Committed by GitHub
Browse files

Merge pull request #1673 from antonio-nino-diaz-arm/an/headers

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