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 __IO_H__ #ifndef IO_STORAGE_H
#define __IO_H__ #define IO_STORAGE_H
#include <errno.h> #include <errno.h>
#include <stdint.h> #include <stdint.h>
...@@ -101,4 +101,4 @@ int io_write(uintptr_t handle, const uintptr_t buffer, size_t length, ...@@ -101,4 +101,4 @@ int io_write(uintptr_t handle, const uintptr_t buffer, size_t length,
int io_close(uintptr_t handle); int io_close(uintptr_t handle);
#endif /* __IO_H__ */ #endif /* IO_STORAGE_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* Address map types for Marvell address translation unit drivers */ /* Address map types for Marvell address translation unit drivers */
#ifndef _ADDR_MAP_H_ #ifndef ADDR_MAP_H
#define _ADDR_MAP_H_ #define ADDR_MAP_H
#include <stdint.h> #include <stdint.h>
...@@ -18,4 +18,4 @@ struct addr_map_win { ...@@ -18,4 +18,4 @@ struct addr_map_win {
uint32_t target_id; uint32_t target_id;
}; };
#endif /* _ADDR_MAP_H_ */ #endif /* ADDR_MAP_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* AXI to M-Bridge decoding unit driver for Marvell Armada 8K and 8K+ SoCs */ /* AXI to M-Bridge decoding unit driver for Marvell Armada 8K and 8K+ SoCs */
#ifndef _AMB_ADEC_H_ #ifndef AMB_ADEC_H
#define _AMB_ADEC_H_ #define AMB_ADEC_H
#include <stdint.h> #include <stdint.h>
...@@ -33,4 +33,4 @@ enum amb_attribute_ids { ...@@ -33,4 +33,4 @@ enum amb_attribute_ids {
int init_amb_adec(uintptr_t base); int init_amb_adec(uintptr_t base);
#endif /* _AMB_ADEC_H_ */ #endif /* AMB_ADEC_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef _ARO_H_ #ifndef ARO_H
#define _ARO_H_ #define ARO_H
enum hws_freq { enum hws_freq {
CPU_FREQ_2000, CPU_FREQ_2000,
...@@ -44,4 +44,4 @@ enum cpu_clock_freq_mode { ...@@ -44,4 +44,4 @@ enum cpu_clock_freq_mode {
int init_aro(void); int init_aro(void);
#endif /* _ARO_H_ */ #endif /* ARO_H */
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* for Marvell SoCs in AP806, AP807, and AP810 * for Marvell SoCs in AP806, AP807, and AP810
*/ */
#ifndef _CACHE_LLC_H_ #ifndef CACHE_LLC_H
#define _CACHE_LLC_H_ #define CACHE_LLC_H
#define LLC_CTRL(ap) (MVEBU_LLC_BASE(ap) + 0x100) #define LLC_CTRL(ap) (MVEBU_LLC_BASE(ap) + 0x100)
#define LLC_SYNC(ap) (MVEBU_LLC_BASE(ap) + 0x700) #define LLC_SYNC(ap) (MVEBU_LLC_BASE(ap) + 0x700)
...@@ -38,5 +38,4 @@ int llc_is_exclusive(int ap_index); ...@@ -38,5 +38,4 @@ int llc_is_exclusive(int ap_index);
void llc_runtime_enable(int ap_index); void llc_runtime_enable(int ap_index);
#endif #endif
#endif /* _CACHE_LLC_H_ */ #endif /* CACHE_LLC_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* CCU unit device driver for Marvell AP807, AP807 and AP810 SoCs */ /* CCU unit device driver for Marvell AP807, AP807 and AP810 SoCs */
#ifndef _CCU_H_ #ifndef CCU_H
#define _CCU_H_ #define CCU_H
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <addr_map.h> #include <addr_map.h>
...@@ -48,4 +48,4 @@ void ccu_save_win_all(int ap_id); ...@@ -48,4 +48,4 @@ void ccu_save_win_all(int ap_id);
void ccu_restore_win_all(int ap_id); void ccu_restore_win_all(int ap_id);
#endif #endif
#endif /* _CCU_H_ */ #endif /* CCU_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* GWIN unit device driver for Marvell AP810 SoC */ /* GWIN unit device driver for Marvell AP810 SoC */
#ifndef _GWIN_H_ #ifndef GWIN_H
#define _GWIN_H_ #define GWIN_H
#include <addr_map.h> #include <addr_map.h>
...@@ -16,4 +16,4 @@ int init_gwin(int ap_index); ...@@ -16,4 +16,4 @@ int init_gwin(int ap_index);
void gwin_temp_win_insert(int ap_index, struct addr_map_win *win, int size); void gwin_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
void gwin_temp_win_remove(int ap_index, struct addr_map_win *win, int size); void gwin_temp_win_remove(int ap_index, struct addr_map_win *win, int size);
#endif /* _GWIN_H_ */ #endif /* GWIN_H */
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* https://spdx.org/licenses * https://spdx.org/licenses
*/ */
#ifndef _I2C_H_ #ifndef I2C_H
#define _I2C_H_ #define I2C_H
void i2c_init(void); void i2c_init(void);
...@@ -16,4 +16,5 @@ int i2c_read(uint8_t chip, ...@@ -16,4 +16,5 @@ int i2c_read(uint8_t chip,
int i2c_write(uint8_t chip, int i2c_write(uint8_t chip,
unsigned int addr, int alen, uint8_t *buffer, int len); unsigned int addr, int alen, uint8_t *buffer, int len);
#endif
#endif /* I2C_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* IO Window unit device driver for Marvell AP807, AP807 and AP810 SoCs */ /* IO Window unit device driver for Marvell AP807, AP807 and AP810 SoCs */
#ifndef _IO_WIN_H_ #ifndef IO_WIN_H
#define _IO_WIN_H_ #define IO_WIN_H
#include <addr_map.h> #include <addr_map.h>
...@@ -18,4 +18,4 @@ void iow_temp_win_remove(int ap_index, struct addr_map_win *win, int size); ...@@ -18,4 +18,4 @@ void iow_temp_win_remove(int ap_index, struct addr_map_win *win, int size);
void iow_save_win_all(int ap_id); void iow_save_win_all(int ap_id);
void iow_restore_win_all(int ap_id); void iow_restore_win_all(int ap_id);
#endif /* _IO_WIN_H_ */ #endif /* IO_WIN_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* IOW unit device driver for Marvell CP110 and CP115 SoCs */ /* IOW unit device driver for Marvell CP110 and CP115 SoCs */
#ifndef _IOB_H_ #ifndef IOB_H
#define _IOB_H_ #define IOB_H
#include <addr_map.h> #include <addr_map.h>
...@@ -28,4 +28,4 @@ int init_iob(uintptr_t base); ...@@ -28,4 +28,4 @@ int init_iob(uintptr_t base);
void iob_cfg_space_update(int ap_idx, int cp_idx, void iob_cfg_space_update(int ap_idx, int cp_idx,
uintptr_t base, uintptr_t new_base); uintptr_t base, uintptr_t new_base);
#endif /* _IOB_H_ */ #endif /* IOB_H */
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
/* MCI bus driver for Marvell ARMADA 8K and 8K+ SoCs */ /* MCI bus driver for Marvell ARMADA 8K and 8K+ SoCs */
#ifndef _MCI_H_ #ifndef MCI_H
#define _MCI_H_ #define MCI_H
int mci_initialize(int mci_index); int mci_initialize(int mci_index);
void mci_turn_link_down(void); void mci_turn_link_down(void);
void mci_turn_link_on(void); void mci_turn_link_on(void);
int mci_get_link_status(void); int mci_get_link_status(void);
#endif /* _MCI_H_ */ #endif /* MCI_H */
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
/* AP8xx Marvell SoC driver */ /* AP8xx Marvell SoC driver */
#ifndef __AP_SETUP_H__ #ifndef AP_SETUP_H
#define __AP_SETUP_H__ #define AP_SETUP_H
void ap_init(void); void ap_init(void);
void ap_ble_init(void); void ap_ble_init(void);
int ap_get_count(void); int ap_get_count(void);
#endif /* __AP_SETUP_H__ */ #endif /* AP_SETUP_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* CP110 Marvell SoC driver */ /* CP110 Marvell SoC driver */
#ifndef __CP110_SETUP_H__ #ifndef CP110_SETUP_H
#define __CP110_SETUP_H__ #define CP110_SETUP_H
#include <mmio.h> #include <mmio.h>
#include <mvebu_def.h> #include <mvebu_def.h>
...@@ -51,4 +51,4 @@ static inline uint32_t cp110_rev_id_get(uintptr_t base) ...@@ -51,4 +51,4 @@ static inline uint32_t cp110_rev_id_get(uintptr_t base)
void cp110_init(uintptr_t cp110_base, uint32_t stream_id); void cp110_init(uintptr_t cp110_base, uint32_t stream_id);
void cp110_ble_init(uintptr_t cp110_base); void cp110_ble_init(uintptr_t cp110_base);
#endif /* __CP110_SETUP_H__ */ #endif /* CP110_SETUP_H */
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* Driver for thermal unit located in Marvell ARMADA 8K and compatible SoCs */ /* Driver for thermal unit located in Marvell ARMADA 8K and compatible SoCs */
#ifndef _THERMAL_H #ifndef THERMAL_H
#define _THERMAL_H #define THERMAL_H
struct tsen_config { struct tsen_config {
/* thermal temperature parameters */ /* thermal temperature parameters */
...@@ -28,4 +28,4 @@ int marvell_thermal_init(struct tsen_config *tsen_cfg); ...@@ -28,4 +28,4 @@ int marvell_thermal_init(struct tsen_config *tsen_cfg);
int marvell_thermal_read(struct tsen_config *tsen_cfg, int *temp); int marvell_thermal_read(struct tsen_config *tsen_cfg, int *temp);
struct tsen_config *marvell_thermal_config_get(void); struct tsen_config *marvell_thermal_config_get(void);
#endif /* _THERMAL_H */ #endif /* THERMAL_H */
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
/* This driver provides support for Mentor Graphics MI2CV IP core */ /* This driver provides support for Mentor Graphics MI2CV IP core */
#ifndef _MI2CV_H_ #ifndef MI2CV_H
#define _MI2CV_H_ #define MI2CV_H
#include <stdint.h> #include <stdint.h>
...@@ -36,4 +36,5 @@ int i2c_read(uint8_t chip, ...@@ -36,4 +36,5 @@ int i2c_read(uint8_t chip,
int i2c_write(uint8_t chip, int i2c_write(uint8_t chip,
unsigned int addr, int alen, uint8_t *buffer, int len); unsigned int addr, int alen, uint8_t *buffer, int len);
#endif
#endif /* MI2CV_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __MMC_H__ #ifndef MMC_H
#define __MMC_H__ #define MMC_H
#include <stdint.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -232,4 +232,4 @@ int mmc_init(const struct mmc_ops *ops_ptr, unsigned int clk, ...@@ -232,4 +232,4 @@ int mmc_init(const struct mmc_ops *ops_ptr, unsigned int clk,
unsigned int width, unsigned int flags, unsigned int width, unsigned int flags,
struct mmc_device_info *device_info); struct mmc_device_info *device_info);
#endif /* __MMC_H__ */ #endif /* MMC_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __GPT_H__ #ifndef GPT_H
#define __GPT_H__ #define GPT_H
#include <partition.h> #include <partition.h>
...@@ -48,4 +48,4 @@ typedef struct gpt_header { ...@@ -48,4 +48,4 @@ typedef struct gpt_header {
int parse_gpt_entry(gpt_entry_t *gpt_entry, partition_entry_t *entry); int parse_gpt_entry(gpt_entry_t *gpt_entry, partition_entry_t *entry);
#endif /* __GPT_H__ */ #endif /* GPT_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __MBR_H__ #ifndef MBR_H
#define __MBR_H__ #define MBR_H
#define MBR_OFFSET 0 #define MBR_OFFSET 0
...@@ -26,4 +26,4 @@ typedef struct mbr_entry { ...@@ -26,4 +26,4 @@ typedef struct mbr_entry {
unsigned int sector_nums; unsigned int sector_nums;
} mbr_entry_t; } mbr_entry_t;
#endif /* __MBR_H__ */ #endif /* MBR_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __PARTITION_H__ #ifndef PARTITION_H
#define __PARTITION_H__ #define PARTITION_H
#include <cassert.h> #include <cassert.h>
#include <stdint.h> #include <stdint.h>
...@@ -36,4 +36,4 @@ const partition_entry_t *get_partition_entry(const char *name); ...@@ -36,4 +36,4 @@ const partition_entry_t *get_partition_entry(const char *name);
const partition_entry_list_t *get_partition_entry_list(void); const partition_entry_list_t *get_partition_entry_list(void);
void partition_init(unsigned int image_id); void partition_init(unsigned int image_id);
#endif /* __PARTITION_H__ */ #endif /* PARTITION_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __PLAT_GPIO_H__ #ifndef STM32_GPIO_H
#define __PLAT_GPIO_H__ #define STM32_GPIO_H
#include <utils_def.h> #include <utils_def.h>
...@@ -98,4 +98,4 @@ void set_gpio(uint32_t bank, uint32_t pin, uint32_t mode, uint32_t speed, ...@@ -98,4 +98,4 @@ void set_gpio(uint32_t bank, uint32_t pin, uint32_t mode, uint32_t speed,
uint32_t pull, uint32_t alternate); uint32_t pull, uint32_t alternate);
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /*__PLAT_GPIO_H__*/ #endif /* STM32_GPIO_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