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 __STM32MP1_I2C_H #ifndef STM32_I2C_H
#define __STM32MP1_I2C_H #define STM32_I2C_H
#include <stdint.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -297,4 +297,4 @@ int stm32_i2c_is_device_ready(struct i2c_handle_s *hi2c, uint16_t dev_addr, ...@@ -297,4 +297,4 @@ int stm32_i2c_is_device_ready(struct i2c_handle_s *hi2c, uint16_t dev_addr,
int stm32_i2c_config_analog_filter(struct i2c_handle_s *hi2c, int stm32_i2c_config_analog_filter(struct i2c_handle_s *hi2c,
uint32_t analog_filter); uint32_t analog_filter);
#endif /* __STM32MP1_I2C_H */ #endif /* STM32_I2C_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_CLK_H__ #ifndef STM32MP1_CLK_H
#define __STM32MP1_CLK_H__ #define STM32MP1_CLK_H
#include <arch_helpers.h> #include <arch_helpers.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -27,4 +27,4 @@ static inline uint32_t get_timer(uint32_t base) ...@@ -27,4 +27,4 @@ static inline uint32_t get_timer(uint32_t base)
return base - (uint32_t)(~read_cntpct_el0()); return base - (uint32_t)(~read_cntpct_el0());
} }
#endif /* __STM32MP1_CLK_H__ */ #endif /* STM32MP1_CLK_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_CLKFUNC_H__ #ifndef STM32MP1_CLKFUNC_H
#define __STM32MP1_CLKFUNC_H__ #define STM32MP1_CLKFUNC_H
#include <stdbool.h> #include <stdbool.h>
...@@ -39,4 +39,4 @@ bool fdt_get_rcc_secure_status(void); ...@@ -39,4 +39,4 @@ bool fdt_get_rcc_secure_status(void);
uintptr_t fdt_get_stgen_base(void); uintptr_t fdt_get_stgen_base(void);
int fdt_get_clock_id(int node); int fdt_get_clock_id(int node);
#endif /* __STM32MP1_CLKFUNC_H__ */ #endif /* STM32MP1_CLKFUNC_H */
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause * SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
*/ */
#ifndef _STM32MP1_DDR_H #ifndef STM32MP1_DDR_H
#define _STM32MP1_DDR_H #define STM32MP1_DDR_H
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h>
#define DT_DDR_COMPAT "st,stm32mp1-ddr" #define DT_DDR_COMPAT "st,stm32mp1-ddr"
...@@ -170,4 +171,4 @@ struct stm32mp1_ddr_config { ...@@ -170,4 +171,4 @@ struct stm32mp1_ddr_config {
int stm32mp1_ddr_clk_enable(struct ddr_info *priv, uint16_t mem_speed); int stm32mp1_ddr_clk_enable(struct ddr_info *priv, uint16_t mem_speed);
void stm32mp1_ddr_init(struct ddr_info *priv, void stm32mp1_ddr_init(struct ddr_info *priv,
struct stm32mp1_ddr_config *config); struct stm32mp1_ddr_config *config);
#endif /* _STM32MP1_DDR_H */ #endif /* STM32MP1_DDR_H */
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_DDR_HELPERS_H__ #ifndef STM32MP1_DDR_HELPERS_H
#define __STM32MP1_DDR_HELPERS_H__ #define STM32MP1_DDR_HELPERS_H
void ddr_enable_clock(void); void ddr_enable_clock(void);
#endif /* __STM32MP1_DDR_HELPERS_H__ */ #endif /* STM32MP1_DDR_HELPERS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause * SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
*/ */
#ifndef _RAM_STM32MP1_DDR_REGS_H #ifndef STM32MP1_DDR_REGS_H
#define _RAM_STM32MP1_DDR_REGS_H #define STM32MP1_DDR_REGS_H
#include <utils_def.h> #include <utils_def.h>
...@@ -410,4 +410,4 @@ struct stm32mp1_ddrphy { ...@@ -410,4 +410,4 @@ struct stm32mp1_ddrphy {
void ddr_enable_clock(void); void ddr_enable_clock(void);
#endif /* _RAM_STM32MP1_DDR_REGS_H */ #endif /* STM32MP1_DDR_REGS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_PMIC_H__ #ifndef STM32MP1_PMIC_H
#define __STM32MP1_PMIC_H__ #define STM32MP1_PMIC_H
#include <stdbool.h> #include <stdbool.h>
...@@ -15,4 +15,4 @@ void initialize_pmic_i2c(void); ...@@ -15,4 +15,4 @@ void initialize_pmic_i2c(void);
void initialize_pmic(void); void initialize_pmic(void);
int pmic_ddr_power_init(enum ddr_type ddr_type); int pmic_ddr_power_init(enum ddr_type ddr_type);
#endif /* __STM32MP1_PMIC_H__ */ #endif /* STM32MP1_PMIC_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_PWR_H__ #ifndef STM32MP1_PWR_H
#define __STM32MP1_PWR_H__ #define STM32MP1_PWR_H
#include <utils_def.h> #include <utils_def.h>
...@@ -29,4 +29,4 @@ ...@@ -29,4 +29,4 @@
#define PWR_MPUCR_CSTDBYDIS BIT(3) #define PWR_MPUCR_CSTDBYDIS BIT(3)
#define PWR_MPUCR_CSSF BIT(9) #define PWR_MPUCR_CSSF BIT(9)
#endif /* __STM32MP1_PWR_H__ */ #endif /* STM32MP1_PWR_H */
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef _STM32MP1_RAM_H #ifndef STM32MP1_RAM_H
#define _STM32MP1_RAM_H #define STM32MP1_RAM_H
int stm32mp1_ddr_probe(void); int stm32mp1_ddr_probe(void);
#endif /* _STM32MP1_RAM_H */ #endif /* STM32MP1_RAM_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_RCC_H__ #ifndef STM32MP1_RCC_H
#define __STM32MP1_RCC_H__ #define STM32MP1_RCC_H
#include <utils_def.h> #include <utils_def.h>
...@@ -365,4 +365,4 @@ ...@@ -365,4 +365,4 @@
/* Values of RCC_MP_AHB4ENSETR register */ /* Values of RCC_MP_AHB4ENSETR register */
#define RCC_MP_AHB4ENSETR_GPIOGEN BIT(6) #define RCC_MP_AHB4ENSETR_GPIOGEN BIT(6)
#endif /* __STM32MP1_RCC_H__ */ #endif /* STM32MP1_RCC_H */
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __STM32MP1_RESET_H__ #ifndef STM32MP1_RESET_H
#define __STM32MP1_RESET_H__ #define STM32MP1_RESET_H
#include <stdint.h> #include <stdint.h>
void stm32mp1_reset_assert(uint32_t reset_id); void stm32mp1_reset_assert(uint32_t reset_id);
void stm32mp1_reset_deassert(uint32_t reset_id); void stm32mp1_reset_deassert(uint32_t reset_id);
#endif /* __STM32MP1_RESET_H__ */ #endif /* STM32MP1_RESET_H */
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef STPMU1_H
#ifndef __STPMU1_H__ #define STPMU1_H
#define __STPMU1_H__
#include <stm32_i2c.h> #include <stm32_i2c.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -138,4 +137,4 @@ uint8_t stpmu1_is_regulator_enabled(const char *name); ...@@ -138,4 +137,4 @@ uint8_t stpmu1_is_regulator_enabled(const char *name);
int stpmu1_regulator_voltage_set(const char *name, uint16_t millivolts); int stpmu1_regulator_voltage_set(const char *name, uint16_t millivolts);
void stpmu1_bind_i2c(struct i2c_handle_s *i2c_handle, uint16_t i2c_addr); void stpmu1_bind_i2c(struct i2c_handle_s *i2c_handle, uint16_t i2c_addr);
#endif /* __STPMU1_H__ */ #endif /* STPMU1_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __DW_MMC_H__ #ifndef DW_MMC_H
#define __DW_MMC_H__ #define DW_MMC_H
#include <mmc.h> #include <mmc.h>
...@@ -20,4 +20,4 @@ typedef struct dw_mmc_params { ...@@ -20,4 +20,4 @@ typedef struct dw_mmc_params {
void dw_mmc_init(dw_mmc_params_t *params, struct mmc_device_info *info); void dw_mmc_init(dw_mmc_params_t *params, struct mmc_device_info *info);
#endif /* __DW_MMC_H__ */ #endif /* DW_MMC_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __UART_16550_H__ #ifndef UART_16550_H
#define __UART_16550_H__ #define UART_16550_H
#include <console.h> #include <console.h>
...@@ -93,4 +93,4 @@ int console_16550_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, ...@@ -93,4 +93,4 @@ int console_16550_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __UART_16550_H__ */ #endif /* UART_16550_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __UFS_H__ #ifndef UFS_H
#define __UFS_H__ #define UFS_H
#include <utils_def.h> #include <utils_def.h>
...@@ -545,4 +545,4 @@ size_t ufs_read_blocks(int lun, int lba, uintptr_t buf, size_t size); ...@@ -545,4 +545,4 @@ size_t ufs_read_blocks(int lun, int lba, uintptr_t buf, size_t size);
size_t ufs_write_blocks(int lun, int lba, const uintptr_t buf, size_t size); size_t ufs_write_blocks(int lun, int lba, const uintptr_t buf, size_t size);
int ufs_init(const ufs_ops_t *ops, ufs_params_t *params); int ufs_init(const ufs_ops_t *ops, ufs_params_t *params);
#endif /* __UFS_H__ */ #endif /* UFS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ARCH_H__ #ifndef ARCH_H
#define __ARCH_H__ #define ARCH_H
#include <utils_def.h> #include <utils_def.h>
...@@ -630,4 +630,4 @@ ...@@ -630,4 +630,4 @@
#define AMEVTYPER1E p15, 0, c13, c15, 6 #define AMEVTYPER1E p15, 0, c13, c15, 6
#define AMEVTYPER1F p15, 0, c13, c15, 7 #define AMEVTYPER1F p15, 0, c13, c15, 7
#endif /* __ARCH_H__ */ #endif /* ARCH_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SMCCC_HELPERS_H__ #ifndef SMCCC_HELPERS_H
#define __SMCCC_HELPERS_H__ #define SMCCC_HELPERS_H
#include <smccc.h> #include <smccc.h>
...@@ -156,4 +156,4 @@ void *smc_get_next_ctx(void); ...@@ -156,4 +156,4 @@ void *smc_get_next_ctx(void);
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __SMCCC_HELPERS_H__ */ #endif /* SMCCC_HELPERS_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SMCCC_MACROS_S__ #ifndef SMCCC_MACROS_S
#define __SMCCC_MACROS_S__ #define SMCCC_MACROS_S
#include <arch.h> #include <arch.h>
...@@ -196,4 +196,4 @@ ...@@ -196,4 +196,4 @@
eret eret
.endm .endm
#endif /* __SMCCC_MACROS_S__ */ #endif /* SMCCC_MACROS_S */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __JMP_H__ #ifndef SETJMP_H
#define __JMP_H__ #define SETJMP_H
#define JMP_CTX_X19 0x0 #define JMP_CTX_X19 0x0
#define JMP_CTX_X21 0x10 #define JMP_CTX_X21 0x10
...@@ -56,4 +56,4 @@ int setjmp(struct jmpbuf *buf); ...@@ -56,4 +56,4 @@ int setjmp(struct jmpbuf *buf);
void longjmp(struct jmpbuf *buf); void longjmp(struct jmpbuf *buf);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __JMP_H__ */ #endif /* SETJMP_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SMCCC_HELPERS_H__ #ifndef SMCCC_HELPERS_H
#define __SMCCC_HELPERS_H__ #define SMCCC_HELPERS_H
#include <smccc.h> #include <smccc.h>
...@@ -82,4 +82,4 @@ ...@@ -82,4 +82,4 @@
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __SMCCC_HELPERS_H__ */ #endif /* SMCCC_HELPERS_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