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

Merge pull request #1726 from antonio-nino-diaz-arm/an/includes

Sanitise includes across codebase
parents 3f99f7e4 8e7b27a4
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
*/ */
#include <assert.h> #include <assert.h>
#include <crypto_mod.h>
#include <debug.h> #include <common/debug.h>
#include <drivers/auth/crypto_mod.h>
/* Variable exported by the crypto library through REGISTER_CRYPTO_LIB() */ /* Variable exported by the crypto library through REGISTER_CRYPTO_LIB() */
......
...@@ -4,20 +4,22 @@ ...@@ -4,20 +4,22 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <arch_helpers.h>
#include <crypto_driver.h>
#include <crypto_mod.h>
#include <debug.h>
#include <mbedtls_common.h>
#include <platform_def.h>
#include <rsa.h>
#include <sbrom_bsv_api.h>
#include <secureboot_base_func.h>
#include <secureboot_gen_defs.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <util.h>
#include <utils.h> #include <platform_def.h>
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/arm/cryptocell/crypto_driver.h>
#include <drivers/arm/cryptocell/rsa.h>
#include <drivers/arm/cryptocell/sbrom_bsv_api.h>
#include <drivers/arm/cryptocell/secureboot_base_func.h>
#include <drivers/arm/cryptocell/secureboot_gen_defs.h>
#include <drivers/arm/cryptocell/util.h>
#include <drivers/auth/crypto_mod.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <lib/utils.h>
#include <mbedtls/oid.h> #include <mbedtls/oid.h>
......
...@@ -20,9 +20,7 @@ endif ...@@ -20,9 +20,7 @@ endif
TF_LDFLAGS += -L$(CCSBROM_LIB_PATH) TF_LDFLAGS += -L$(CCSBROM_LIB_PATH)
LDLIBS += -lcc_712sbromx509 LDLIBS += -lcc_712sbromx509
INCLUDES += -Iinclude/drivers/arm/cryptocell
CRYPTOCELL_SOURCES := drivers/auth/cryptocell/cryptocell_crypto.c CRYPTOCELL_SOURCES := drivers/auth/cryptocell/cryptocell_crypto.c
BL1_SOURCES += ${CRYPTOCELL_SOURCES} BL1_SOURCES += ${CRYPTOCELL_SOURCES}
BL2_SOURCES += ${CRYPTOCELL_SOURCES} BL2_SOURCES += ${CRYPTOCELL_SOURCES}
\ No newline at end of file
...@@ -5,14 +5,15 @@ ...@@ -5,14 +5,15 @@
*/ */
#include <assert.h> #include <assert.h>
#include <auth_common.h>
#include <debug.h>
#include <errno.h> #include <errno.h>
#include <img_parser_mod.h>
#include <limits.h> #include <limits.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <utils_def.h>
#include <common/debug.h>
#include <drivers/auth/auth_common.h>
#include <drivers/auth/img_parser_mod.h>
#include <lib/utils_def.h>
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START); IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START);
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END); IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END);
......
...@@ -5,14 +5,16 @@ ...@@ -5,14 +5,16 @@
*/ */
#include <assert.h> #include <assert.h>
#include <debug.h> #include <stddef.h>
/* mbed TLS headers */ /* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h> #include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h> #include <mbedtls/platform.h>
#include <mbedtls_common.h>
#include <mbedtls_config.h> #include <common/debug.h>
#include <platform.h> #include <drivers/auth/mbedtls/mbedtls_common.h>
#include <stddef.h> #include <drivers/auth/mbedtls/mbedtls_config.h>
#include <plat/common/platform.h>
static void cleanup(void) static void cleanup(void)
{ {
......
...@@ -14,10 +14,9 @@ ifeq (${MBEDTLS_DIR},) ...@@ -14,10 +14,9 @@ ifeq (${MBEDTLS_DIR},)
endif endif
MBEDTLS_INC = -I${MBEDTLS_DIR}/include MBEDTLS_INC = -I${MBEDTLS_DIR}/include
INCLUDES += -Iinclude/drivers/auth/mbedtls
# Specify mbed TLS configuration file # Specify mbed TLS configuration file
MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>" MBEDTLS_CONFIG_FILE := "<drivers/auth/mbedtls/mbedtls_config.h>"
$(eval $(call add_define,MBEDTLS_CONFIG_FILE)) $(eval $(call add_define,MBEDTLS_CONFIG_FILE))
MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <crypto_mod.h>
#include <debug.h>
#include <mbedtls_common.h>
#include <mbedtls_config.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
...@@ -17,6 +13,11 @@ ...@@ -17,6 +13,11 @@
#include <mbedtls/oid.h> #include <mbedtls/oid.h>
#include <mbedtls/platform.h> #include <mbedtls/platform.h>
#include <common/debug.h>
#include <drivers/auth/crypto_mod.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <drivers/auth/mbedtls/mbedtls_config.h>
#define LIB_NAME "mbed TLS" #define LIB_NAME "mbed TLS"
/* /*
......
...@@ -12,20 +12,21 @@ ...@@ -12,20 +12,21 @@
* extensions field, such as an image hash or a public key. * extensions field, such as an image hash or a public key.
*/ */
#include <arch_helpers.h>
#include <assert.h> #include <assert.h>
#include <img_parser_mod.h>
#include <mbedtls_common.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <utils.h>
/* mbed TLS headers */ /* mbed TLS headers */
#include <mbedtls/asn1.h> #include <mbedtls/asn1.h>
#include <mbedtls/oid.h> #include <mbedtls/oid.h>
#include <mbedtls/platform.h> #include <mbedtls/platform.h>
#include <arch_helpers.h>
#include <drivers/auth/img_parser_mod.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <lib/utils.h>
/* Maximum OID string length ("a.b.c.d.e.f ...") */ /* Maximum OID string length ("a.b.c.d.e.f ...") */
#define MAX_OID_STR_LEN 64 #define MAX_OID_STR_LEN 64
......
...@@ -4,12 +4,13 @@ ...@@ -4,12 +4,13 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <auth_mod.h>
#include <platform_def.h>
#include <stddef.h> #include <stddef.h>
#include <platform_def.h>
#include <drivers/auth/auth_mod.h>
#if USE_TBBR_DEFS #if USE_TBBR_DEFS
#include <tbbr_oid.h> #include <tools_share/tbbr_oid.h>
#else #else
#include <platform_oid.h> #include <platform_oid.h>
#endif #endif
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#include <cadence/cdns_uart.h>
#define USE_FINISH_CONSOLE_REG_2 #define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/cadence/cdns_uart.h>
/* /*
* "core" functions are low-level implementations that don't require * "core" functions are low-level implementations that don't require
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
*/ */
#include <errno.h> #include <errno.h>
#include <mmio.h>
#include <v2m_flash.h> #include <drivers/cfi/v2m_flash.h>
#include <lib/mmio.h>
/* /*
* This file supplies a low level interface to the vexpress NOR flash * This file supplies a low level interface to the vexpress NOR flash
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#if MULTI_CONSOLE_API #if MULTI_CONSOLE_API
#include <assert.h> #include <assert.h>
#include <drivers/console.h> #include <drivers/console.h>
console_t *console_list; console_t *console_list;
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
*/ */
#include <asm_macros.S> #include <asm_macros.S>
#include <cbmem_console.h>
#define USE_FINISH_CONSOLE_REG_2 #define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/coreboot/cbmem_console.h>
/* /*
* This driver implements access to coreboot's in-memory console * This driver implements access to coreboot's in-memory console
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
*/ */
#include <assert.h> #include <assert.h>
#include <delay_timer.h>
#include <platform_def.h> #include <platform_def.h>
#include <utils_def.h>
#include <drivers/delay_timer.h>
#include <lib/utils_def.h>
/*********************************************************** /***********************************************************
* The delay timer implementation * The delay timer implementation
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <arch_helpers.h>
#include <assert.h> #include <assert.h>
#include <bl_common.h>
#include <debug.h> #include <arch_helpers.h>
#include <delay_timer.h> #include <common/bl_common.h>
#include <generic_delay_timer.h> #include <common/debug.h>
#include <platform.h> #include <drivers/delay_timer.h>
#include <drivers/generic_delay_timer.h>
#include <plat/common/platform.h>
/* Ticks elapsed in one second by a signal of 1 MHz */ /* Ticks elapsed in one second by a signal of 1 MHz */
#define MHZ_TICKS_PER_SEC 1000000 #define MHZ_TICKS_PER_SEC 1000000
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>
/* /*
* The gpio implementation * The gpio implementation
......
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
*/ */
#include <assert.h> #include <assert.h>
#include <delay_timer.h>
#include <mmio.h> #include <drivers/delay_timer.h>
#include <lib/mmio.h>
#include <imx_gpt.h> #include <imx_gpt.h>
#define GPTCR_SWR BIT(15) /* Software reset */ #define GPTCR_SWR BIT(15) /* Software reset */
......
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <arch.h>
#include <stdint.h> #include <stdint.h>
#include <mmio.h>
#include <platform_def.h> #include <platform_def.h>
#include <arch.h>
#include <lib/mmio.h>
#include <imx_uart.h> #include <imx_uart.h>
/* TX/RX FIFO threshold */ /* TX/RX FIFO threshold */
......
...@@ -4,17 +4,19 @@ ...@@ -4,17 +4,19 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h> #include <assert.h>
#include <debug.h>
#include <delay_timer.h>
#include <imx_usdhc.h>
#include <mmc.h>
#include <errno.h> #include <errno.h>
#include <mmio.h>
#include <string.h> #include <string.h>
#include <arch.h>
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <drivers/mmc.h>
#include <lib/mmio.h>
#include <imx_usdhc.h>
static void imx_usdhc_initialize(void); static void imx_usdhc_initialize(void);
static int imx_usdhc_send_cmd(struct mmc_cmd *cmd); static int imx_usdhc_send_cmd(struct mmc_cmd *cmd);
static int imx_usdhc_set_ios(unsigned int clk, unsigned int width); static int imx_usdhc_set_ios(unsigned int clk, unsigned int width);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef IMX_USDHC_H #ifndef IMX_USDHC_H
#define IMX_USDHC_H #define IMX_USDHC_H
#include <mmc.h> #include <drivers/mmc.h>
typedef struct imx_usdhc_params { typedef struct imx_usdhc_params {
uintptr_t reg_base; uintptr_t reg_base;
......
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