Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH}
- include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for
includes isn't a good idea. It defeats one of the advantages of having
folders and it introduces problems that are sometimes subtle (because
you may not know the header you are actually including if there are two
of them).
For example, this patch had to be created because two headers were
called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform
to avoid collision."). More recently, this patch has had similar
problems: 46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit 4ecca33988b9 ("Move include and
source files to logical locations"). At that time, there weren't too
many headers so it wasn't a real issue. However, time has shown that
this creates problems.
Platforms that want to preserve the way they include headers may add the
removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/include/arch/aarch32/arch.h b/include/arch/aarch32/arch.h
index 8260c54..cbe272c 100644
--- a/include/arch/aarch32/arch.h
+++ b/include/arch/aarch32/arch.h
@@ -7,7 +7,7 @@
#ifndef ARCH_H
#define ARCH_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* MIDR bit definitions
diff --git a/include/arch/aarch32/arch_helpers.h b/include/arch/aarch32/arch_helpers.h
index a6fe14f..c2773c1 100644
--- a/include/arch/aarch32/arch_helpers.h
+++ b/include/arch/aarch32/arch_helpers.h
@@ -7,11 +7,12 @@
#ifndef ARCH_HELPERS_H
#define ARCH_HELPERS_H
-#include <arch.h>
#include <cdefs.h>
#include <stdint.h>
#include <string.h>
+#include <arch.h>
+
/**********************************************************************
* Macros which create inline functions to read or write CPU system
* registers
diff --git a/include/arch/aarch32/asm_macros.S b/include/arch/aarch32/asm_macros.S
index c54f75c..8408804 100644
--- a/include/arch/aarch32/asm_macros.S
+++ b/include/arch/aarch32/asm_macros.S
@@ -7,8 +7,8 @@
#define ASM_MACROS_S
#include <arch.h>
-#include <asm_macros_common.S>
-#include <spinlock.h>
+#include <common/asm_macros_common.S>
+#include <lib/spinlock.h>
/*
* TLBI instruction with type specifier that implements the workaround for
diff --git a/include/arch/aarch32/console_macros.S b/include/arch/aarch32/console_macros.S
index ba6e7d0..ed5088d 100644
--- a/include/arch/aarch32/console_macros.S
+++ b/include/arch/aarch32/console_macros.S
@@ -6,7 +6,7 @@
#ifndef CONSOLE_MACROS_S
#define CONSOLE_MACROS_S
-#include <console.h>
+#include <drivers/console.h>
/*
* This macro encapsulates the common setup that has to be done at the end of
diff --git a/include/arch/aarch32/smccc_helpers.h b/include/arch/aarch32/smccc_helpers.h
index 67952ec..d3e5e59 100644
--- a/include/arch/aarch32/smccc_helpers.h
+++ b/include/arch/aarch32/smccc_helpers.h
@@ -7,7 +7,7 @@
#ifndef SMCCC_HELPERS_H
#define SMCCC_HELPERS_H
-#include <smccc.h>
+#include <lib/smccc.h>
/* These are offsets to registers in smc_ctx_t */
#define SMC_CTX_GPREG_R0 U(0x0)
@@ -25,9 +25,11 @@
#define SMC_CTX_SIZE U(0x90)
#ifndef __ASSEMBLY__
-#include <cassert.h>
+
#include <stdint.h>
+#include <lib/cassert.h>
+
/*
* The generic structure to save arguments and callee saved registers during
* an SMC. Also this structure is used to store the result return values after
diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h
index 72a14dc..8a44d83 100644
--- a/include/arch/aarch64/arch.h
+++ b/include/arch/aarch64/arch.h
@@ -7,7 +7,7 @@
#ifndef ARCH_H
#define ARCH_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* MIDR bit definitions
diff --git a/include/arch/aarch64/arch_helpers.h b/include/arch/aarch64/arch_helpers.h
index 7222b9d..b912b42 100644
--- a/include/arch/aarch64/arch_helpers.h
+++ b/include/arch/aarch64/arch_helpers.h
@@ -7,12 +7,13 @@
#ifndef ARCH_HELPERS_H
#define ARCH_HELPERS_H
-#include <arch.h>
#include <cdefs.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
+#include <arch.h>
+
/**********************************************************************
* Macros which create inline functions to read or write CPU system
* registers
diff --git a/include/arch/aarch64/asm_macros.S b/include/arch/aarch64/asm_macros.S
index dea3021..387be4c 100644
--- a/include/arch/aarch64/asm_macros.S
+++ b/include/arch/aarch64/asm_macros.S
@@ -7,8 +7,8 @@
#define ASM_MACROS_S
#include <arch.h>
-#include <asm_macros_common.S>
-#include <spinlock.h>
+#include <common/asm_macros_common.S>
+#include <lib/spinlock.h>
/*
* TLBI instruction with type specifier that implements the workaround for
diff --git a/include/arch/aarch64/console_macros.S b/include/arch/aarch64/console_macros.S
index 5c88d4f..90ef420 100644
--- a/include/arch/aarch64/console_macros.S
+++ b/include/arch/aarch64/console_macros.S
@@ -6,7 +6,7 @@
#ifndef CONSOLE_MACROS_S
#define CONSOLE_MACROS_S
-#include <console.h>
+#include <drivers/console.h>
/*
* This macro encapsulates the common setup that has to be done at the end of
diff --git a/include/arch/aarch64/smccc_helpers.h b/include/arch/aarch64/smccc_helpers.h
index efab18b..e28697d 100644
--- a/include/arch/aarch64/smccc_helpers.h
+++ b/include/arch/aarch64/smccc_helpers.h
@@ -7,12 +7,14 @@
#ifndef SMCCC_HELPERS_H
#define SMCCC_HELPERS_H
-#include <smccc.h>
+#include <lib/smccc.h>
#ifndef __ASSEMBLY__
-#include <context.h>
+
#include <stdbool.h>
+#include <context.h>
+
/* Convenience macros to return from SMC handler */
#define SMC_RET0(_h) { \
return (uint64_t) (_h); \
diff --git a/include/bl1/bl1.h b/include/bl1/bl1.h
index 39b8d1e..7b5d875 100644
--- a/include/bl1/bl1.h
+++ b/include/bl1/bl1.h
@@ -7,7 +7,7 @@
#ifndef BL1_H
#define BL1_H
-#include <bl_common.h>
+#include <common/bl_common.h>
/*
* Defines for BL1 SMC function ids.
@@ -62,7 +62,8 @@
((_fid >= FWU_SMC_FID_START) && (_fid <= FWU_SMC_FID_END))
#ifndef __ASSEMBLY__
-#include <cassert.h>
+
+#include <lib/cassert.h>
struct entry_point_info;
diff --git a/include/bl1/tbbr/tbbr_img_desc.h b/include/bl1/tbbr/tbbr_img_desc.h
index bb36eb5..db15cdb 100644
--- a/include/bl1/tbbr/tbbr_img_desc.h
+++ b/include/bl1/tbbr/tbbr_img_desc.h
@@ -7,7 +7,7 @@
#ifndef TBBR_IMG_DESC_H
#define TBBR_IMG_DESC_H
-#include <bl_common.h>
+#include <common/bl_common.h>
extern image_desc_t bl1_tbbr_image_descs[];
diff --git a/include/bl31/ehf.h b/include/bl31/ehf.h
index f35d810..ee00d09 100644
--- a/include/bl31/ehf.h
+++ b/include/bl31/ehf.h
@@ -11,7 +11,8 @@
#include <cdefs.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Valid priorities set bit 0 of the priority handler. */
#define EHF_PRI_VALID_ BIT(0)
diff --git a/include/bl31/interrupt_mgmt.h b/include/bl31/interrupt_mgmt.h
index 6a49fb6..b1683cc 100644
--- a/include/bl31/interrupt_mgmt.h
+++ b/include/bl31/interrupt_mgmt.h
@@ -8,7 +8,7 @@
#define INTERRUPT_MGMT_H
#include <arch.h>
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Constants for the types of interrupts recognised by the IM framework
diff --git a/include/bl32/payloads/tlk.h b/include/bl32/payloads/tlk.h
index 0234cbe..2c12633 100644
--- a/include/bl32/payloads/tlk.h
+++ b/include/bl32/payloads/tlk.h
@@ -7,7 +7,7 @@
#ifndef TLK_H
#define TLK_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* Generate function IDs for the Trusted OS/Apps
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index 56c89fc..c12b08b 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -7,9 +7,9 @@
#ifndef BL_COMMON_H
#define BL_COMMON_H
-#include <ep_info.h>
-#include <param_header.h>
-#include <utils_def.h>
+#include <common/ep_info.h>
+#include <common/param_header.h>
+#include <lib/utils_def.h>
#define UP U(1)
#define DOWN U(0)
@@ -58,11 +58,11 @@
#define SERROR_AARCH32 U(0xf)
#ifndef __ASSEMBLY__
-#include <cassert.h>
+
#include <stddef.h>
#include <stdint.h>
-#include <utils_def.h> /* To retain compatibility */
+#include <lib/cassert.h>
/*
* Declarations of linker defined symbols to help determine memory layout of
diff --git a/include/common/debug.h b/include/common/debug.h
index a14a66e..f8faf68 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -7,7 +7,7 @@
#ifndef DEBUG_H
#define DEBUG_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* The log output macros print output to the console. These macros produce
@@ -28,12 +28,14 @@
#define LOG_LEVEL_VERBOSE U(50)
#ifndef __ASSEMBLY__
+
#include <cdefs.h>
-#include <console.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
+#include <drivers/console.h>
+
/*
* Define Log Markers corresponding to each log level which will
* be embedded in the format string and is expected by tf_log() to determine
diff --git a/include/common/desc_image_load.h b/include/common/desc_image_load.h
index 6254895..f2f26ea 100644
--- a/include/common/desc_image_load.h
+++ b/include/common/desc_image_load.h
@@ -6,7 +6,7 @@
#ifndef DESC_IMAGE_LOAD_H
#define DESC_IMAGE_LOAD_H
-#include <bl_common.h>
+#include <common/bl_common.h>
/* Following structure is used to store BL ep/image info. */
typedef struct bl_mem_params_node {
diff --git a/include/common/ep_info.h b/include/common/ep_info.h
index 0f67687..a09d03b 100644
--- a/include/common/ep_info.h
+++ b/include/common/ep_info.h
@@ -7,8 +7,8 @@
#ifndef EP_INFO_H
#define EP_INFO_H
-#include <param_header.h>
-#include <utils_def.h>
+#include <common/param_header.h>
+#include <lib/utils_def.h>
#define SECURE U(0x0)
#define NON_SECURE U(0x1)
@@ -64,9 +64,10 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
typedef struct aapcs64_params {
u_register_t arg0;
u_register_t arg1;
diff --git a/include/common/param_header.h b/include/common/param_header.h
index e9717cb..0c1503f 100644
--- a/include/common/param_header.h
+++ b/include/common/param_header.h
@@ -8,7 +8,8 @@
#define PARAM_HEADER_H
#include <stdbool.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Param header types */
#define PARAM_EP U(0x01)
diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h
index e32c287..59bf158 100644
--- a/include/common/runtime_svc.h
+++ b/include/common/runtime_svc.h
@@ -7,10 +7,10 @@
#ifndef RUNTIME_SVC_H
#define RUNTIME_SVC_H
-#include <bl_common.h> /* to include exception types */
-#include <cassert.h>
+#include <common/bl_common.h> /* to include exception types */
+#include <lib/cassert.h>
+#include <lib/utils_def.h>
#include <smccc_helpers.h> /* to include SMCCC definitions */
-#include <utils_def.h>
/*******************************************************************************
* Structure definition, typedefs & constants for the runtime service framework
diff --git a/include/common/tbbr/tbbr_img_def.h b/include/common/tbbr/tbbr_img_def.h
index bd8f5dc..672886d 100644
--- a/include/common/tbbr/tbbr_img_def.h
+++ b/include/common/tbbr/tbbr_img_def.h
@@ -7,7 +7,7 @@
#ifndef TBBR_IMG_DEF_H
#define TBBR_IMG_DEF_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Firmware Image Package */
#define FIP_IMAGE_ID U(0)
diff --git a/include/drivers/arm/cci.h b/include/drivers/arm/cci.h
index 24b76da..c5ddcfd 100644
--- a/include/drivers/arm/cci.h
+++ b/include/drivers/arm/cci.h
@@ -7,7 +7,7 @@
#ifndef CCI_H
#define CCI_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Slave interface offsets from PERIPHBASE */
#define SLAVE_IFACE6_OFFSET UL(0x7000)
diff --git a/include/drivers/arm/gic_common.h b/include/drivers/arm/gic_common.h
index a9ec7b7..3ac1b43 100644
--- a/include/drivers/arm/gic_common.h
+++ b/include/drivers/arm/gic_common.h
@@ -7,7 +7,7 @@
#ifndef GIC_COMMON_H
#define GIC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* GIC Distributor interface general definitions
diff --git a/include/drivers/arm/gicv2.h b/include/drivers/arm/gicv2.h
index 705077c..6bc5101 100644
--- a/include/drivers/arm/gicv2.h
+++ b/include/drivers/arm/gicv2.h
@@ -7,7 +7,7 @@
#ifndef GICV2_H
#define GICV2_H
-#include <gic_common.h>
+#include <drivers/arm/gic_common.h>
/*******************************************************************************
* GICv2 miscellaneous definitions
@@ -119,9 +119,10 @@
#ifndef __ASSEMBLY__
#include <cdefs.h>
-#include <interrupt_props.h>
#include <stdint.h>
+#include <common/interrupt_props.h>
+
/*******************************************************************************
* This structure describes some of the implementation defined attributes of
* the GICv2 IP. It is used by the platform port to specify these attributes
diff --git a/include/drivers/arm/gicv3.h b/include/drivers/arm/gicv3.h
index c26f297..2382697 100644
--- a/include/drivers/arm/gicv3.h
+++ b/include/drivers/arm/gicv3.h
@@ -209,12 +209,13 @@
#ifndef __ASSEMBLY__
-#include <arch_helpers.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <arch_helpers.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
static inline bool gicv3_is_intr_id_special_identifier(unsigned int id)
{
diff --git a/include/drivers/arm/pl011.h b/include/drivers/arm/pl011.h
index 6216a61..f201f00 100644
--- a/include/drivers/arm/pl011.h
+++ b/include/drivers/arm/pl011.h
@@ -7,7 +7,7 @@
#ifndef PL011_H
#define PL011_H
-#include <console.h>
+#include <drivers/console.h>
/* PL011 Registers */
#define UARTDR 0x000
diff --git a/include/drivers/arm/pl061_gpio.h b/include/drivers/arm/pl061_gpio.h
index 6c4a9f5..68238c9 100644
--- a/include/drivers/arm/pl061_gpio.h
+++ b/include/drivers/arm/pl061_gpio.h
@@ -7,7 +7,7 @@
#ifndef PL061_GPIO_H
#define PL061_GPIO_H
-#include <gpio.h>
+#include <drivers/gpio.h>
void pl061_gpio_register(uintptr_t base_addr, int gpio_dev);
void pl061_gpio_init(void);
diff --git a/include/drivers/arm/smmu_v3.h b/include/drivers/arm/smmu_v3.h
index 1b7ffb8..33f3d6f 100644
--- a/include/drivers/arm/smmu_v3.h
+++ b/include/drivers/arm/smmu_v3.h
@@ -8,7 +8,8 @@
#define SMMU_V3_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* SMMUv3 register offsets from device base */
#define SMMU_S_IDR1 U(0x8004)
diff --git a/include/drivers/arm/sp804_delay_timer.h b/include/drivers/arm/sp804_delay_timer.h
index 8eb8715..f8769e8 100644
--- a/include/drivers/arm/sp804_delay_timer.h
+++ b/include/drivers/arm/sp804_delay_timer.h
@@ -7,9 +7,9 @@
#ifndef SP804_DELAY_TIMER_H
#define SP804_DELAY_TIMER_H
-#include <delay_timer.h>
#include <stdint.h>
+#include <drivers/delay_timer.h>
uint32_t sp804_get_timer_value(void);
diff --git a/include/drivers/arm/sp805.h b/include/drivers/arm/sp805.h
index e7714a3..551bfe4 100644
--- a/include/drivers/arm/sp805.h
+++ b/include/drivers/arm/sp805.h
@@ -7,7 +7,7 @@
#ifndef SP805_H
#define SP805_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SP805 register offset */
#define SP805_WDOG_LOAD_OFF UL(0x000)
diff --git a/include/drivers/arm/tzc380.h b/include/drivers/arm/tzc380.h
index 19cf988..03b9b05 100644
--- a/include/drivers/arm/tzc380.h
+++ b/include/drivers/arm/tzc380.h
@@ -7,8 +7,8 @@
#ifndef TZC380_H
#define TZC380_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define TZC380_CONFIGURATION_OFF U(0x000)
#define ACTION_OFF U(0x004)
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h
index a7bb3f6..98ef0ec 100644
--- a/include/drivers/arm/tzc400.h
+++ b/include/drivers/arm/tzc400.h
@@ -7,8 +7,8 @@
#ifndef TZC400_H
#define TZC400_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define BUILD_CONFIG_OFF U(0x000)
#define GATE_KEEPER_OFF U(0x008)
diff --git a/include/drivers/arm/tzc_common.h b/include/drivers/arm/tzc_common.h
index 4b81547..4820baa 100644
--- a/include/drivers/arm/tzc_common.h
+++ b/include/drivers/arm/tzc_common.h
@@ -7,7 +7,7 @@
#ifndef TZC_COMMON_H
#define TZC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* Offset of core registers from the start of the base of configuration
diff --git a/include/drivers/arm/tzc_dmc500.h b/include/drivers/arm/tzc_dmc500.h
index df6e7f9..24bfaeb 100644
--- a/include/drivers/arm/tzc_dmc500.h
+++ b/include/drivers/arm/tzc_dmc500.h
@@ -7,8 +7,8 @@
#ifndef TZC_DMC500_H
#define TZC_DMC500_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define SI_STATUS_OFFSET U(0x000)
#define SI_STATE_CTRL_OFFSET U(0x030)
diff --git a/include/drivers/arm/tzc_dmc620.h b/include/drivers/arm/tzc_dmc620.h
index 074bbc1..e0e6760 100644
--- a/include/drivers/arm/tzc_dmc620.h
+++ b/include/drivers/arm/tzc_dmc620.h
@@ -7,7 +7,7 @@
#ifndef TZC_DMC620_H
#define TZC_DMC620_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DMC-620 memc register offsets */
#define DMC620_MEMC_STATUS U(0x0000)
diff --git a/include/drivers/auth/auth_mod.h b/include/drivers/auth/auth_mod.h
index 19bc2f1..9089953 100644
--- a/include/drivers/auth/auth_mod.h
+++ b/include/drivers/auth/auth_mod.h
@@ -9,10 +9,10 @@
#if TRUSTED_BOARD_BOOT
-#include <auth_common.h>
-#include <cot_def.h>
-#include <img_parser_mod.h>
-#include <tbbr_img_def.h>
+#include <common/tbbr/cot_def.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/img_parser_mod.h>
/*
* Image flags
diff --git a/include/drivers/auth/img_parser_mod.h b/include/drivers/auth/img_parser_mod.h
index 4379693..b2fb60e 100644
--- a/include/drivers/auth/img_parser_mod.h
+++ b/include/drivers/auth/img_parser_mod.h
@@ -7,7 +7,7 @@
#ifndef IMG_PARSER_MOD_H
#define IMG_PARSER_MOD_H
-#include <auth_common.h>
+#include <drivers/auth/auth_common.h>
/*
* Return values
diff --git a/include/drivers/cadence/cdns_uart.h b/include/drivers/cadence/cdns_uart.h
index 490be10..0a1cf77 100644
--- a/include/drivers/cadence/cdns_uart.h
+++ b/include/drivers/cadence/cdns_uart.h
@@ -7,7 +7,7 @@
#ifndef CDNS_UART_H
#define CDNS_UART_H
-#include <console.h>
+#include <drivers/console.h>
/* This is very minimalistic and will only work in QEMU. */
diff --git a/include/drivers/console.h b/include/drivers/console.h
index 02f2f8a..24887f9 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -7,7 +7,7 @@
#ifndef CONSOLE_H
#define CONSOLE_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define CONSOLE_T_NEXT (U(0) * REGSZ)
#define CONSOLE_T_FLAGS (U(1) * REGSZ)
@@ -44,7 +44,9 @@
int (*const flush)(struct console *console);
/* Additional private driver data may follow here. */
} console_t;
-#include <console_assertions.h> /* offset macro assertions for console_t */
+
+/* offset macro assertions for console_t */
+#include <drivers/console_assertions.h>
/*
* NOTE: There is no publicly accessible console_register() function. Consoles
diff --git a/include/drivers/console_assertions.h b/include/drivers/console_assertions.h
index 559bb50..00caa31 100644
--- a/include/drivers/console_assertions.h
+++ b/include/drivers/console_assertions.h
@@ -7,7 +7,7 @@
#ifndef CONSOLE_ASSERTIONS_H
#define CONSOLE_ASSERTIONS_H
-#include <cassert.h>
+#include <lib/cassert.h>
/*
* This file contains some separate assertions about console_t, moved here to
diff --git a/include/drivers/coreboot/cbmem_console.h b/include/drivers/coreboot/cbmem_console.h
index 7fe7a72..40c90e6 100644
--- a/include/drivers/coreboot/cbmem_console.h
+++ b/include/drivers/coreboot/cbmem_console.h
@@ -7,7 +7,7 @@
#ifndef CBMEM_CONSOLE_H
#define CBMEM_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_CBMC_BASE CONSOLE_T_DRVDATA
#define CONSOLE_T_CBMC_SIZE (CONSOLE_T_DRVDATA + REGSZ)
diff --git a/include/drivers/io/io_block.h b/include/drivers/io/io_block.h
index d6d32f9..c99e8c7 100644
--- a/include/drivers/io/io_block.h
+++ b/include/drivers/io/io_block.h
@@ -7,7 +7,7 @@
#ifndef IO_BLOCK_H
#define IO_BLOCK_H
-#include <io_storage.h>
+#include <drivers/io/io_storage.h>
/* block devices ops */
typedef struct io_block_ops {
diff --git a/include/drivers/io/io_driver.h b/include/drivers/io/io_driver.h
index 587f137..2b704f4 100644
--- a/include/drivers/io/io_driver.h
+++ b/include/drivers/io/io_driver.h
@@ -7,9 +7,9 @@
#ifndef IO_DRIVER_H
#define IO_DRIVER_H
-#include <io_storage.h>
#include <stdint.h>
+#include <drivers/io/io_storage.h>
/* Generic IO entity structure,representing an accessible IO construct on the
* device, such as a file */
diff --git a/include/drivers/io/io_storage.h b/include/drivers/io/io_storage.h
index c496d48..ec6db3f 100644
--- a/include/drivers/io/io_storage.h
+++ b/include/drivers/io/io_storage.h
@@ -10,8 +10,8 @@
#include <errno.h>
#include <stdint.h>
#include <stdio.h> /* For ssize_t */
-#include <uuid.h>
+#include <tools_share/uuid.h>
/* Device type which can be used to enable policy decisions about which device
* to access */
diff --git a/include/drivers/marvell/ccu.h b/include/drivers/marvell/ccu.h
index 2757765..546d9f1 100644
--- a/include/drivers/marvell/ccu.h
+++ b/include/drivers/marvell/ccu.h
@@ -11,7 +11,7 @@
#define CCU_H
#ifndef __ASSEMBLY__
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
#endif
/* CCU registers definitions */
diff --git a/include/drivers/marvell/gwin.h b/include/drivers/marvell/gwin.h
index 6b7f175..1b874a7 100644
--- a/include/drivers/marvell/gwin.h
+++ b/include/drivers/marvell/gwin.h
@@ -10,7 +10,7 @@
#ifndef GWIN_H
#define GWIN_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
int init_gwin(int ap_index);
void gwin_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
diff --git a/include/drivers/marvell/io_win.h b/include/drivers/marvell/io_win.h
index 45e8666..7438d6b 100644
--- a/include/drivers/marvell/io_win.h
+++ b/include/drivers/marvell/io_win.h
@@ -10,7 +10,7 @@
#ifndef IO_WIN_H
#define IO_WIN_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
int init_io_win(int ap_index);
void iow_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
diff --git a/include/drivers/marvell/iob.h b/include/drivers/marvell/iob.h
index ccbdf96..9b5e515 100644
--- a/include/drivers/marvell/iob.h
+++ b/include/drivers/marvell/iob.h
@@ -10,7 +10,7 @@
#ifndef IOB_H
#define IOB_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
enum target_ids_iob {
INTERNAL_TID = 0x0,
diff --git a/include/drivers/marvell/mochi/cp110_setup.h b/include/drivers/marvell/mochi/cp110_setup.h
index 18d9f18..3686257 100644
--- a/include/drivers/marvell/mochi/cp110_setup.h
+++ b/include/drivers/marvell/mochi/cp110_setup.h
@@ -10,7 +10,8 @@
#ifndef CP110_SETUP_H
#define CP110_SETUP_H
-#include <mmio.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
#define MVEBU_DEVICE_ID_REG (MVEBU_CP_DFX_OFFSET + 0x40)
diff --git a/include/drivers/marvell/uart/a3700_console.h b/include/drivers/marvell/uart/a3700_console.h
index 01335a2..5511d96 100644
--- a/include/drivers/marvell/uart/a3700_console.h
+++ b/include/drivers/marvell/uart/a3700_console.h
@@ -8,7 +8,7 @@
#ifndef A3700_CONSOLE_H
#define A3700_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
/* MVEBU UART Registers */
#define UART_RX_REG 0x00
diff --git a/include/drivers/meson/meson_console.h b/include/drivers/meson/meson_console.h
index 759571d..5da1e3f 100644
--- a/include/drivers/meson/meson_console.h
+++ b/include/drivers/meson/meson_console.h
@@ -7,7 +7,7 @@
#ifndef MESON_CONSOLE_H
#define MESON_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_MESON_BASE CONSOLE_T_DRVDATA
diff --git a/include/drivers/mmc.h b/include/drivers/mmc.h
index a62928b..2aaa28d 100644
--- a/include/drivers/mmc.h
+++ b/include/drivers/mmc.h
@@ -8,7 +8,8 @@
#define MMC_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
#define MMC_BLOCK_SIZE U(512)
#define MMC_BLOCK_MASK (MMC_BLOCK_SIZE - U(1))
diff --git a/include/drivers/partition/gpt.h b/include/drivers/partition/gpt.h
index 7984e4d..3ae160f 100644
--- a/include/drivers/partition/gpt.h
+++ b/include/drivers/partition/gpt.h
@@ -7,7 +7,7 @@
#ifndef GPT_H
#define GPT_H
-#include <partition.h>
+#include <drivers/partition/partition.h>
#define PARTITION_TYPE_GPT 0xee
#define GPT_HEADER_OFFSET PARTITION_BLOCK_SIZE
diff --git a/include/drivers/partition/partition.h b/include/drivers/partition/partition.h
index 2aeaace..d94c782 100644
--- a/include/drivers/partition/partition.h
+++ b/include/drivers/partition/partition.h
@@ -7,9 +7,10 @@
#ifndef PARTITION_H
#define PARTITION_H
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
#if !PLAT_PARTITION_MAX_ENTRIES
# define PLAT_PARTITION_MAX_ENTRIES 128
#endif /* PLAT_PARTITION_MAX_ENTRIES */
diff --git a/include/drivers/st/io_mmc.h b/include/drivers/st/io_mmc.h
index de71e7d..b35b4b5 100644
--- a/include/drivers/st/io_mmc.h
+++ b/include/drivers/st/io_mmc.h
@@ -7,7 +7,7 @@
#ifndef IO_MMC_H
#define IO_MMC_H
-#include <io_driver.h>
+#include <drivers/io/io_driver.h>
int register_io_dev_mmc(const io_dev_connector_t **dev_con);
diff --git a/include/drivers/st/io_stm32image.h b/include/drivers/st/io_stm32image.h
index b668219..6806055 100644
--- a/include/drivers/st/io_stm32image.h
+++ b/include/drivers/st/io_stm32image.h
@@ -7,8 +7,8 @@
#ifndef IO_STM32IMAGE_H
#define IO_STM32IMAGE_H
-#include <io_driver.h>
-#include <partition.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/partition/partition.h>
#define MAX_LBA_SIZE 512
#define MAX_PART_NAME_SIZE (EFI_NAMELEN + 1)
diff --git a/include/drivers/st/stm32_console.h b/include/drivers/st/stm32_console.h
index 57e6d74..b303768 100644
--- a/include/drivers/st/stm32_console.h
+++ b/include/drivers/st/stm32_console.h
@@ -7,7 +7,7 @@
#ifndef STM32_CONSOLE_H
#define STM32_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_STM32_BASE CONSOLE_T_DRVDATA
diff --git a/include/drivers/st/stm32_gpio.h b/include/drivers/st/stm32_gpio.h
index 938922b..acd95ec 100644
--- a/include/drivers/st/stm32_gpio.h
+++ b/include/drivers/st/stm32_gpio.h
@@ -7,7 +7,7 @@
#ifndef STM32_GPIO_H
#define STM32_GPIO_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define STM32_GPIOA_BANK U(0x50002000)
#define STM32_GPIOZ_BANK U(0x54004000)
diff --git a/include/drivers/st/stm32_i2c.h b/include/drivers/st/stm32_i2c.h
index 4760c00..de2ca59 100644
--- a/include/drivers/st/stm32_i2c.h
+++ b/include/drivers/st/stm32_i2c.h
@@ -8,7 +8,8 @@
#define STM32_I2C_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Bit definition for I2C_CR1 register */
#define I2C_CR1_PE BIT(0)
diff --git a/include/drivers/st/stm32_sdmmc2.h b/include/drivers/st/stm32_sdmmc2.h
index b172659..aa9472c 100644
--- a/include/drivers/st/stm32_sdmmc2.h
+++ b/include/drivers/st/stm32_sdmmc2.h
@@ -7,9 +7,10 @@
#ifndef STM32_SDMMC2_H
#define STM32_SDMMC2_H
-#include <mmc.h>
#include <stdbool.h>
+#include <drivers/mmc.h>
+
struct stm32_sdmmc2_params {
uintptr_t reg_base;
unsigned int clk_rate;
diff --git a/include/drivers/st/stm32_uart_regs.h b/include/drivers/st/stm32_uart_regs.h
index e78d3d4..14b296c 100644
--- a/include/drivers/st/stm32_uart_regs.h
+++ b/include/drivers/st/stm32_uart_regs.h
@@ -7,7 +7,7 @@
#ifndef STM32_UART_REGS_H
#define STM32_UART_REGS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define USART_CR1 U(0x00)
#define USART_CR2 U(0x04)
diff --git a/include/drivers/st/stm32mp1_clk.h b/include/drivers/st/stm32mp1_clk.h
index c895517..5594e23 100644
--- a/include/drivers/st/stm32mp1_clk.h
+++ b/include/drivers/st/stm32mp1_clk.h
@@ -7,9 +7,10 @@
#ifndef STM32MP1_CLK_H
#define STM32MP1_CLK_H
-#include <arch_helpers.h>
#include <stdbool.h>
+#include <arch_helpers.h>
+
int stm32mp1_clk_probe(void);
int stm32mp1_clk_init(void);
bool stm32mp1_clk_is_enabled(unsigned long id);
diff --git a/include/drivers/st/stm32mp1_clkfunc.h b/include/drivers/st/stm32mp1_clkfunc.h
index 2467af9..106dcae 100644
--- a/include/drivers/st/stm32mp1_clkfunc.h
+++ b/include/drivers/st/stm32mp1_clkfunc.h
@@ -7,9 +7,10 @@
#ifndef STM32MP1_CLKFUNC_H
#define STM32MP1_CLKFUNC_H
-#include <libfdt.h>
#include <stdbool.h>
+#include <libfdt.h>
+
enum stm32mp_osc_id {
_HSI,
_HSE,
diff --git a/include/drivers/st/stm32mp1_ddr_regs.h b/include/drivers/st/stm32mp1_ddr_regs.h
index 288e072..bfcd5e2 100644
--- a/include/drivers/st/stm32mp1_ddr_regs.h
+++ b/include/drivers/st/stm32mp1_ddr_regs.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_DDR_REGS_H
#define STM32MP1_DDR_REGS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DDR3/LPDDR2/LPDDR3 Controller (DDRCTRL) registers */
struct stm32mp1_ddrctl {
diff --git a/include/drivers/st/stm32mp1_pmic.h b/include/drivers/st/stm32mp1_pmic.h
index cc80b25..256e340 100644
--- a/include/drivers/st/stm32mp1_pmic.h
+++ b/include/drivers/st/stm32mp1_pmic.h
@@ -9,6 +9,8 @@
#include <stdbool.h>
+#include <stm32mp1_def.h>
+
bool dt_check_pmic(void);
int dt_pmic_enable_boot_on_regulators(void);
void initialize_pmic_i2c(void);
diff --git a/include/drivers/st/stm32mp1_pwr.h b/include/drivers/st/stm32mp1_pwr.h
index b34536e..e17df44 100644
--- a/include/drivers/st/stm32mp1_pwr.h
+++ b/include/drivers/st/stm32mp1_pwr.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_PWR_H
#define STM32MP1_PWR_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define PWR_CR1 U(0x00)
#define PWR_CR2 U(0x08)
diff --git a/include/drivers/st/stm32mp1_rcc.h b/include/drivers/st/stm32mp1_rcc.h
index 87f4d7f..fd406c5 100644
--- a/include/drivers/st/stm32mp1_rcc.h
+++ b/include/drivers/st/stm32mp1_rcc.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_RCC_H
#define STM32MP1_RCC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define RCC_TZCR U(0x00)
#define RCC_OCENSETR U(0x0C)
diff --git a/include/drivers/st/stpmu1.h b/include/drivers/st/stpmu1.h
index 4bbcebb..e75d9a6 100644
--- a/include/drivers/st/stpmu1.h
+++ b/include/drivers/st/stpmu1.h
@@ -7,8 +7,8 @@
#ifndef STPMU1_H
#define STPMU1_H
-#include <stm32_i2c.h>
-#include <utils_def.h>
+#include <drivers/st/stm32_i2c.h>
+#include <lib/utils_def.h>
#define TURN_ON_REG 0x1U
#define TURN_OFF_REG 0x2U
diff --git a/include/drivers/synopsys/dw_mmc.h b/include/drivers/synopsys/dw_mmc.h
index 533a876..7031e0f 100644
--- a/include/drivers/synopsys/dw_mmc.h
+++ b/include/drivers/synopsys/dw_mmc.h
@@ -7,7 +7,7 @@
#ifndef DW_MMC_H
#define DW_MMC_H
-#include <mmc.h>
+#include <drivers/mmc.h>
typedef struct dw_mmc_params {
uintptr_t reg_base;
diff --git a/include/drivers/ti/uart/uart_16550.h b/include/drivers/ti/uart/uart_16550.h
index ad80c57..92b1ea8 100644
--- a/include/drivers/ti/uart/uart_16550.h
+++ b/include/drivers/ti/uart/uart_16550.h
@@ -7,7 +7,7 @@
#ifndef UART_16550_H
#define UART_16550_H
-#include <console.h>
+#include <drivers/console.h>
/* UART16550 Registers */
#define UARTTX 0x0
diff --git a/include/drivers/ufs.h b/include/drivers/ufs.h
index 414649b..a10cd80 100644
--- a/include/drivers/ufs.h
+++ b/include/drivers/ufs.h
@@ -7,7 +7,7 @@
#ifndef UFS_H
#define UFS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* register map of UFSHCI */
/* Controller Capabilities */
diff --git a/include/lib/bakery_lock.h b/include/lib/bakery_lock.h
index 2d1612e..a2f540c 100644
--- a/include/lib/bakery_lock.h
+++ b/include/lib/bakery_lock.h
@@ -15,7 +15,8 @@
#include <cdefs.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/*****************************************************************************
* Internal helpers used by the bakery lock implementation.
diff --git a/include/lib/cpus/aarch32/cortex_a57.h b/include/lib/cpus/aarch32/cortex_a57.h
index 6f60c11..2ac1e17 100644
--- a/include/lib/cpus/aarch32/cortex_a57.h
+++ b/include/lib/cpus/aarch32/cortex_a57.h
@@ -7,7 +7,7 @@
#ifndef CORTEX_A57_H
#define CORTEX_A57_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Cortex-A57 midr for revision 0 */
#define CORTEX_A57_MIDR 0x410FD070
diff --git a/include/lib/cpus/aarch32/cortex_a72.h b/include/lib/cpus/aarch32/cortex_a72.h
index f45865a..95402d0 100644
--- a/include/lib/cpus/aarch32/cortex_a72.h
+++ b/include/lib/cpus/aarch32/cortex_a72.h
@@ -6,7 +6,8 @@
#ifndef CORTEX_A72_H
#define CORTEX_A72_H
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Cortex-A72 midr for revision 0 */
#define CORTEX_A72_MIDR 0x410FD080
diff --git a/include/lib/cpus/aarch32/cpu_macros.S b/include/lib/cpus/aarch32/cpu_macros.S
index 1c0da0f..a5ae6a4 100644
--- a/include/lib/cpus/aarch32/cpu_macros.S
+++ b/include/lib/cpus/aarch32/cpu_macros.S
@@ -7,7 +7,7 @@
#define CPU_MACROS_S
#include <arch.h>
-#include <errata_report.h>
+#include <lib/cpus/errata_report.h>
#if defined(IMAGE_BL1) || defined(IMAGE_BL32) || (defined(IMAGE_BL2) && BL2_AT_EL3)
#define IMAGE_AT_EL3
diff --git a/include/lib/cpus/aarch64/cortex_a57.h b/include/lib/cpus/aarch64/cortex_a57.h
index 71d07db..5b6c9dd 100644
--- a/include/lib/cpus/aarch64/cortex_a57.h
+++ b/include/lib/cpus/aarch64/cortex_a57.h
@@ -6,7 +6,8 @@
#ifndef CORTEX_A57_H
#define CORTEX_A57_H
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Cortex-A57 midr for revision 0 */
#define CORTEX_A57_MIDR U(0x410FD070)
diff --git a/include/lib/cpus/aarch64/cortex_a72.h b/include/lib/cpus/aarch64/cortex_a72.h
index 4eafc11..60b6c61 100644
--- a/include/lib/cpus/aarch64/cortex_a72.h
+++ b/include/lib/cpus/aarch64/cortex_a72.h
@@ -6,7 +6,8 @@
#ifndef CORTEX_A72_H
#define CORTEX_A72_H
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Cortex-A72 midr for revision 0 */
#define CORTEX_A72_MIDR 0x410FD080
diff --git a/include/lib/cpus/aarch64/cortex_a75.h b/include/lib/cpus/aarch64/cortex_a75.h
index f68f98f..fabc1af 100644
--- a/include/lib/cpus/aarch64/cortex_a75.h
+++ b/include/lib/cpus/aarch64/cortex_a75.h
@@ -7,7 +7,7 @@
#ifndef CORTEX_A75_H
#define CORTEX_A75_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Cortex-A75 MIDR */
#define CORTEX_A75_MIDR U(0x410fd0a0)
diff --git a/include/lib/cpus/aarch64/cortex_ares.h b/include/lib/cpus/aarch64/cortex_ares.h
index 4f3e812..cfc36e4 100644
--- a/include/lib/cpus/aarch64/cortex_ares.h
+++ b/include/lib/cpus/aarch64/cortex_ares.h
@@ -7,7 +7,7 @@
#ifndef CORTEX_ARES_H
#define CORTEX_ARES_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Cortex-ARES MIDR for revision 0 */
#define CORTEX_ARES_MIDR U(0x410fd0c0)
diff --git a/include/lib/cpus/aarch64/cpu_macros.S b/include/lib/cpus/aarch64/cpu_macros.S
index 2875700..b907668 100644
--- a/include/lib/cpus/aarch64/cpu_macros.S
+++ b/include/lib/cpus/aarch64/cpu_macros.S
@@ -7,7 +7,7 @@
#define CPU_MACROS_S
#include <arch.h>
-#include <errata_report.h>
+#include <lib/cpus/errata_report.h>
#define CPU_IMPL_PN_MASK (MIDR_IMPL_MASK << MIDR_IMPL_SHIFT) | \
(MIDR_PN_MASK << MIDR_PN_SHIFT)
diff --git a/include/lib/cpus/aarch64/dsu_def.h b/include/lib/cpus/aarch64/dsu_def.h
index 0e2d93a..aa8b1b1 100644
--- a/include/lib/cpus/aarch64/dsu_def.h
+++ b/include/lib/cpus/aarch64/dsu_def.h
@@ -7,7 +7,7 @@
#ifndef DSU_DEF_H
#define DSU_DEF_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/********************************************************************
* DSU control registers definitions *
diff --git a/include/lib/cpus/errata_report.h b/include/lib/cpus/errata_report.h
index c97d4c2..17b2c30 100644
--- a/include/lib/cpus/errata_report.h
+++ b/include/lib/cpus/errata_report.h
@@ -11,8 +11,8 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <spinlock.h>
-#include <utils_def.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
#if DEBUG
void print_errata_status(void);
diff --git a/include/lib/el3_runtime/aarch32/context.h b/include/lib/el3_runtime/aarch32/context.h
index 1ea19ca..86ff53a 100644
--- a/include/lib/el3_runtime/aarch32/context.h
+++ b/include/lib/el3_runtime/aarch32/context.h
@@ -7,7 +7,7 @@
#ifndef CONTEXT_H
#define CONTEXT_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Constants that allow assembler code to access members of and the 'regs'
@@ -26,9 +26,10 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
/*
* Common constants to help define the 'cpu_context' structure and its
* members below.
diff --git a/include/lib/el3_runtime/aarch64/context.h b/include/lib/el3_runtime/aarch64/context.h
index 8c5f4c6..70c50aa 100644
--- a/include/lib/el3_runtime/aarch64/context.h
+++ b/include/lib/el3_runtime/aarch64/context.h
@@ -7,7 +7,7 @@
#ifndef CONTEXT_H
#define CONTEXT_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Constants that allow assembler code to access members of and the 'gp_regs'
@@ -180,10 +180,12 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
-#include <platform_def.h> /* for CACHE_WRITEBACK_GRANULE */
#include <stdint.h>
+#include <platform_def.h> /* for CACHE_WRITEBACK_GRANULE */
+
+#include <lib/cassert.h>
+
/*
* Common constants to help define the 'cpu_context' structure and its
* members below.
diff --git a/include/lib/el3_runtime/context_mgmt.h b/include/lib/el3_runtime/context_mgmt.h
index 149ac3f..f23f9cd 100644
--- a/include/lib/el3_runtime/context_mgmt.h
+++ b/include/lib/el3_runtime/context_mgmt.h
@@ -7,11 +7,12 @@
#ifndef CONTEXT_MGMT_H
#define CONTEXT_MGMT_H
-#include <arch.h>
#include <assert.h>
#include <context.h>
#include <stdint.h>
+#include <arch.h>
+
/*******************************************************************************
* Forward declarations
******************************************************************************/
diff --git a/include/lib/el3_runtime/cpu_data.h b/include/lib/el3_runtime/cpu_data.h
index 561f8be..9e1d7f1 100644
--- a/include/lib/el3_runtime/cpu_data.h
+++ b/include/lib/el3_runtime/cpu_data.h
@@ -7,9 +7,10 @@
#ifndef CPU_DATA_H
#define CPU_DATA_H
-#include <ehf.h>
#include <platform_def.h> /* CACHE_WRITEBACK_GRANULE required */
+#include <bl31/ehf.h>
+
#ifdef AARCH32
#if CRASH_REPORTING
@@ -51,9 +52,9 @@
#ifndef __ASSEMBLY__
#include <arch_helpers.h>
-#include <cassert.h>
+#include <lib/cassert.h>
+#include <lib/psci/psci.h>
#include <platform_def.h>
-#include <psci.h>
#include <stdint.h>
/* Offsets for the cpu_data structure */
diff --git a/include/lib/el3_runtime/pubsub.h b/include/lib/el3_runtime/pubsub.h
index 930952f..eb91286 100644
--- a/include/lib/el3_runtime/pubsub.h
+++ b/include/lib/el3_runtime/pubsub.h
@@ -30,11 +30,12 @@
/* For the compiler ... */
-#include <arch_helpers.h>
#include <assert.h>
#include <cdefs.h>
#include <stddef.h>
+#include <arch_helpers.h>
+
#define __pubsub_section(event) __section("__pubsub_" #event)
/*
diff --git a/include/lib/el3_runtime/pubsub_events.h b/include/lib/el3_runtime/pubsub_events.h
index 64b3f63..8e4a87a 100644
--- a/include/lib/el3_runtime/pubsub_events.h
+++ b/include/lib/el3_runtime/pubsub_events.h
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <pubsub.h>
+#include <lib/el3_runtime/pubsub.h>
/*
* This file defines a list of pubsub events, declared using
diff --git a/include/lib/extensions/amu.h b/include/lib/extensions/amu.h
index 1836fe5..99ecfcc 100644
--- a/include/lib/extensions/amu.h
+++ b/include/lib/extensions/amu.h
@@ -7,11 +7,13 @@
#ifndef AMU_H
#define AMU_H
-#include <cassert.h>
-#include <platform_def.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <platform_def.h>
+
+#include <lib/cassert.h>
+#include <lib/utils_def.h>
/* All group 0 counters */
#define AMU_GROUP0_COUNTERS_MASK U(0xf)
diff --git a/include/lib/extensions/ras.h b/include/lib/extensions/ras.h
index 62fd63f..9f6b290 100644
--- a/include/lib/extensions/ras.h
+++ b/include/lib/extensions/ras.h
@@ -71,7 +71,8 @@
#ifndef __ASSEMBLY__
#include <assert.h>
-#include <ras_arch.h>
+
+#include <lib/extensions/ras_arch.h>
struct err_record_info;
diff --git a/include/lib/extensions/ras_arch.h b/include/lib/extensions/ras_arch.h
index e6cd736..e9375a3 100644
--- a/include/lib/extensions/ras_arch.h
+++ b/include/lib/extensions/ras_arch.h
@@ -184,7 +184,7 @@
#include <arch_helpers.h>
#include <assert.h>
#include <context.h>
-#include <mmio.h>
+#include <lib/mmio.h>
#include <stdint.h>
/*
diff --git a/include/lib/libc/assert.h b/include/lib/libc/assert.h
index 2cca6a0..d04f9dc 100644
--- a/include/lib/libc/assert.h
+++ b/include/lib/libc/assert.h
@@ -8,9 +8,11 @@
#define ASSERT_H
#include <cdefs.h>
-#include <debug.h>
+
#include <platform_def.h>
+#include <common/debug.h>
+
#ifndef PLAT_LOG_LEVEL_ASSERT
#define PLAT_LOG_LEVEL_ASSERT LOG_LEVEL
#endif
diff --git a/include/lib/object_pool.h b/include/lib/object_pool.h
index 7d40b41..0f85331 100644
--- a/include/lib/object_pool.h
+++ b/include/lib/object_pool.h
@@ -7,9 +7,10 @@
#ifndef OBJECT_POOL_H
#define OBJECT_POOL_H
-#include <debug.h>
#include <stdlib.h>
-#include <utils_def.h>
+
+#include <common/debug.h>
+#include <lib/utils_def.h>
/*
* Pool of statically allocated objects.
diff --git a/include/lib/optee_utils.h b/include/lib/optee_utils.h
index b13c450..6067caf 100644
--- a/include/lib/optee_utils.h
+++ b/include/lib/optee_utils.h
@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#ifndef OPTEE_UTILS_H
#define OPTEE_UTILS_H
-#include <bl_common.h>
+#include <common/bl_common.h>
int parse_optee_header(entry_point_info_t *header_ep,
image_info_t *pager_image_info,
diff --git a/include/lib/pmf/pmf.h b/include/lib/pmf/pmf.h
index 18ef0a5..df7c9ff 100644
--- a/include/lib/pmf/pmf.h
+++ b/include/lib/pmf/pmf.h
@@ -7,9 +7,9 @@
#ifndef PMF_H
#define PMF_H
-#include <cassert.h>
-#include <pmf_helpers.h>
-#include <utils_def.h>
+#include <lib/cassert.h>
+#include <lib/pmf/pmf_helpers.h>
+#include <lib/utils_def.h>
/*
* Constants used for/by PMF services.
diff --git a/include/lib/pmf/pmf_helpers.h b/include/lib/pmf/pmf_helpers.h
index c535b22..e6798a7 100644
--- a/include/lib/pmf/pmf_helpers.h
+++ b/include/lib/pmf/pmf_helpers.h
@@ -7,13 +7,14 @@
#ifndef PMF_HELPERS_H
#define PMF_HELPERS_H
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <platform.h>
#include <stddef.h>
#include <stdint.h>
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <plat/common/platform.h>
+
/*
* Prototype for PMF service functions.
*/
diff --git a/include/lib/psci/psci.h b/include/lib/psci/psci.h
index b7febc3..fe279d4 100644
--- a/include/lib/psci/psci.h
+++ b/include/lib/psci/psci.h
@@ -7,11 +7,12 @@
#ifndef PSCI_H
#define PSCI_H
-#include <bakery_lock.h>
-#include <bl_common.h>
#include <platform_def.h> /* for PLAT_NUM_PWR_DOMAINS */
-#include <psci_lib.h> /* To maintain compatibility for SPDs */
-#include <utils_def.h>
+
+#include <common/bl_common.h>
+#include <lib/bakery_lock.h>
+#include <lib/psci/psci_lib.h> /* To maintain compatibility for SPDs */
+#include <lib/utils_def.h>
/*******************************************************************************
* Number of power domains whose state this PSCI implementation can track
diff --git a/include/lib/psci/psci_lib.h b/include/lib/psci/psci_lib.h
index 134cad9..53d7711 100644
--- a/include/lib/psci/psci_lib.h
+++ b/include/lib/psci/psci_lib.h
@@ -7,9 +7,10 @@
#ifndef PSCI_LIB_H
#define PSCI_LIB_H
-#include <ep_info.h>
+#include <common/ep_info.h>
#ifndef __ASSEMBLY__
+
#include <cdefs.h>
#include <stdint.h>
diff --git a/include/lib/runtime_instr.h b/include/lib/runtime_instr.h
index cb64839..f5a3f13 100644
--- a/include/lib/runtime_instr.h
+++ b/include/lib/runtime_instr.h
@@ -7,7 +7,7 @@
#ifndef RUNTIME_INSTR_H
#define RUNTIME_INSTR_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define RT_INSTR_ENTER_PSCI U(0)
#define RT_INSTR_EXIT_PSCI U(1)
diff --git a/include/lib/smccc.h b/include/lib/smccc.h
index 6ee8aa0..b10c52c 100644
--- a/include/lib/smccc.h
+++ b/include/lib/smccc.h
@@ -7,7 +7,7 @@
#ifndef SMCCC_H
#define SMCCC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define SMCCC_VERSION_MAJOR_SHIFT U(16)
#define SMCCC_VERSION_MAJOR_MASK U(0x7FFF)
@@ -21,10 +21,10 @@
#if SMCCC_MAJOR_VERSION == 1
# define SMCCC_MINOR_VERSION U(1)
-# include <smccc_v1.h>
+# include <lib/smccc_v1.h>
#elif SMCCC_MAJOR_VERSION == 2
# define SMCCC_MINOR_VERSION U(0)
-# include <smccc_v2.h>
+# include <lib/smccc_v2.h>
#else
# error "Unsupported version of SMCCC."
#endif
@@ -35,9 +35,10 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
#define is_caller_non_secure(_f) (((_f) & SMC_FROM_NON_SECURE) != U(0))
#define is_caller_secure(_f) (!is_caller_non_secure(_f))
diff --git a/include/lib/utils.h b/include/lib/utils.h
index b6ab26e..6748454 100644
--- a/include/lib/utils.h
+++ b/include/lib/utils.h
@@ -13,6 +13,7 @@
*/
#if !(defined(__LINKER__) || defined(__ASSEMBLY__))
+#include <stddef.h>
#include <stdint.h>
typedef struct mem_region {
diff --git a/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h b/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h
index 37f3b53..a333d1e 100644
--- a/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h
+++ b/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h
@@ -8,8 +8,8 @@
#define XLAT_TABLES_AARCH32_H
#include <arch.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
#if !defined(PAGE_SIZE)
#error "PAGE_SIZE is not defined."
diff --git a/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h b/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h
index 91ca8e4..cc5624c 100644
--- a/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h
+++ b/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h
@@ -8,8 +8,8 @@
#define XLAT_TABLES_AARCH64_H
#include <arch.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
#if !defined(PAGE_SIZE)
#error "PAGE_SIZE is not defined."
diff --git a/include/lib/xlat_tables/xlat_tables.h b/include/lib/xlat_tables/xlat_tables.h
index 050679d..9e2543f 100644
--- a/include/lib/xlat_tables/xlat_tables.h
+++ b/include/lib/xlat_tables/xlat_tables.h
@@ -7,12 +7,13 @@
#ifndef XLAT_TABLES_H
#define XLAT_TABLES_H
-#include <xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
#ifndef __ASSEMBLY__
#include <stddef.h>
#include <stdint.h>
-#include <xlat_mmu_helpers.h>
+
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
/* Helper macro to define entries for mmap_region_t. It creates
* identity mappings for each region.
diff --git a/include/lib/xlat_tables/xlat_tables_compat.h b/include/lib/xlat_tables/xlat_tables_compat.h
index 4650a8c..90768db 100644
--- a/include/lib/xlat_tables/xlat_tables_compat.h
+++ b/include/lib/xlat_tables/xlat_tables_compat.h
@@ -5,7 +5,7 @@
*/
#if XLAT_TABLES_LIB_V2
-#include <xlat_tables_v2.h>
+#include <lib/xlat_tables/xlat_tables_v2.h>
#else
-#include <xlat_tables.h>
+#include <lib/xlat_tables/xlat_tables.h>
#endif
diff --git a/include/lib/xlat_tables/xlat_tables_defs.h b/include/lib/xlat_tables/xlat_tables_defs.h
index 09baae9..6d0fb78 100644
--- a/include/lib/xlat_tables/xlat_tables_defs.h
+++ b/include/lib/xlat_tables/xlat_tables_defs.h
@@ -8,8 +8,8 @@
#define XLAT_TABLES_DEFS_H
#include <arch.h>
-#include <utils_def.h>
-#include <xlat_mmu_helpers.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
/* Miscellaneous MMU related constants */
#define NUM_2MB_IN_GB (U(1) << 9)
diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h
index 5c4edc3..5551426 100644
--- a/include/lib/xlat_tables/xlat_tables_v2.h
+++ b/include/lib/xlat_tables/xlat_tables_v2.h
@@ -7,13 +7,14 @@
#ifndef XLAT_TABLES_V2_H
#define XLAT_TABLES_V2_H
-#include <xlat_tables_defs.h>
-#include <xlat_tables_v2_helpers.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_v2_helpers.h>
#ifndef __ASSEMBLY__
#include <stddef.h>
#include <stdint.h>
-#include <xlat_mmu_helpers.h>
+
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
/*
* Default granularity size for an mmap_region_t.
diff --git a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
index fa89958..ce5cf82 100644
--- a/include/lib/xlat_tables/xlat_tables_v2_helpers.h
+++ b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
@@ -18,12 +18,14 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
-#include <platform_def.h>
#include <stdbool.h>
#include <stddef.h>
-#include <xlat_tables_arch.h>
-#include <xlat_tables_defs.h>
+
+#include <platform_def.h>
+
+#include <lib/cassert.h>
+#include <lib/xlat_tables/xlat_tables_arch.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
/* Forward declaration */
struct mmap_region;
diff --git a/include/plat/arm/board/common/board_css_def.h b/include/plat/arm/board/common/board_css_def.h
index 29211be..6cca389 100644
--- a/include/plat/arm/board/common/board_css_def.h
+++ b/include/plat/arm/board/common/board_css_def.h
@@ -7,9 +7,10 @@
#ifndef BOARD_CSS_DEF_H
#define BOARD_CSS_DEF_H
-#include <common_def.h>
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
+
#include <soc_css_def.h>
-#include <utils_def.h>
#include <v2m_def.h>
/*
@@ -31,7 +32,7 @@
#ifndef __ASSEMBLY__
-#include <mmio.h>
+#include <lib/mmio.h>
#define BOARD_CSS_GET_PLAT_TYPE(addr) \
((mmio_read_32(addr) & BOARD_CSS_PLAT_ID_REG_ID_MASK) \
diff --git a/include/plat/arm/board/common/v2m_def.h b/include/plat/arm/board/common/v2m_def.h
index ed57fc9..c5de407 100644
--- a/include/plat/arm/board/common/v2m_def.h
+++ b/include/plat/arm/board/common/v2m_def.h
@@ -6,7 +6,7 @@
#ifndef V2M_DEF_H
#define V2M_DEF_H
-#include <xlat_tables_compat.h>
+#include <lib/xlat_tables/xlat_tables_compat.h>
/* V2M motherboard system registers & offsets */
#define V2M_SYSREGS_BASE UL(0x1c010000)
diff --git a/include/plat/arm/common/aarch64/arm_macros.S b/include/plat/arm/common/aarch64/arm_macros.S
index c2ba7db..0bd0daf 100644
--- a/include/plat/arm/common/aarch64/arm_macros.S
+++ b/include/plat/arm/common/aarch64/arm_macros.S
@@ -6,9 +6,9 @@
#ifndef ARM_MACROS_S
#define ARM_MACROS_S
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
#include <platform_def.h>
.section .rodata.gic_reg_name, "aS"
diff --git a/include/plat/arm/common/aarch64/cci_macros.S b/include/plat/arm/common/aarch64/cci_macros.S
index 069dc85..07f7cd3 100644
--- a/include/plat/arm/common/aarch64/cci_macros.S
+++ b/include/plat/arm/common/aarch64/cci_macros.S
@@ -6,7 +6,7 @@
#ifndef CCI_MACROS_S
#define CCI_MACROS_S
-#include <cci.h>
+#include <drivers/arm/cci.h>
#include <platform_def.h>
.section .rodata.cci_reg_name, "aS"
diff --git a/include/plat/arm/common/arm_config.h b/include/plat/arm/common/arm_config.h
index 4dda350..c2b28df 100644
--- a/include/plat/arm/common/arm_config.h
+++ b/include/plat/arm/common/arm_config.h
@@ -7,7 +7,8 @@
#define ARM_CONFIG_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Whether Base memory map is in use */
#define ARM_CONFIG_BASE_MMAP BIT(1)
diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h
index 4ab3a80..c63fddb 100644
--- a/include/plat/arm/common/arm_def.h
+++ b/include/plat/arm/common/arm_def.h
@@ -6,15 +6,15 @@
#ifndef ARM_DEF_H
#define ARM_DEF_H
-#include <arch.h>
-#include <common_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <arch.h>
+#include <common/interrupt_props.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+#include <plat/common/common_def.h>
/******************************************************************************
* Definitions common to all ARM standard platforms
diff --git a/include/plat/arm/common/arm_sip_svc.h b/include/plat/arm/common/arm_sip_svc.h
index 3e25cbc..16573ce 100644
--- a/include/plat/arm/common/arm_sip_svc.h
+++ b/include/plat/arm/common/arm_sip_svc.h
@@ -7,7 +7,7 @@
#ifndef ARM_SIP_SVC_H
#define ARM_SIP_SVC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SMC function IDs for SiP Service queries */
diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h
index bf3cb8f..bdcbc96 100644
--- a/include/plat/arm/common/arm_spm_def.h
+++ b/include/plat/arm/common/arm_spm_def.h
@@ -6,9 +6,10 @@
#ifndef ARM_SPM_DEF_H
#define ARM_SPM_DEF_H
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+
#include <arm_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
/*
* Reserve 4 MiB for binaries of Secure Partitions and Resource Description
diff --git a/include/plat/arm/common/arm_tzc_dram.ld.S b/include/plat/arm/common/arm_tzc_dram.ld.S
index df951e1..6dcea0b 100644
--- a/include/plat/arm/common/arm_tzc_dram.ld.S
+++ b/include/plat/arm/common/arm_tzc_dram.ld.S
@@ -3,10 +3,10 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef ARM_TZC_DRAM_LD_S__
-#define ARM_TZC_DRAM_LD_S__
+#ifndef ARM_TZC_DRAM_LD_S
+#define ARM_TZC_DRAM_LD_S
-#include <xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
MEMORY {
EL3_SEC_DRAM (rw): ORIGIN = ARM_EL3_TZC_DRAM1_BASE, LENGTH = ARM_EL3_TZC_DRAM1_SIZE
@@ -27,4 +27,4 @@
} >EL3_SEC_DRAM
}
-#endif /* ARM_TZC_DRAM_LD_S__ */
+#endif /* ARM_TZC_DRAM_LD_S */
diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h
index 9b45984..6281608 100644
--- a/include/plat/arm/common/plat_arm.h
+++ b/include/plat/arm/common/plat_arm.h
@@ -6,14 +6,15 @@
#ifndef PLAT_ARM_H
#define PLAT_ARM_H
-#include <bakery_lock.h>
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <spinlock.h>
-#include <tzc_common.h>
-#include <utils_def.h>
-#include <xlat_tables_compat.h>
+
+#include <drivers/arm/tzc_common.h>
+#include <lib/bakery_lock.h>
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_compat.h>
/*******************************************************************************
* Forward declarations
diff --git a/include/plat/arm/css/common/css_def.h b/include/plat/arm/css/common/css_def.h
index 4a7d314..6b355a4 100644
--- a/include/plat/arm/css/common/css_def.h
+++ b/include/plat/arm/css/common/css_def.h
@@ -7,10 +7,11 @@
#ifndef CSS_DEF_H
#define CSS_DEF_H
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/tzc400.h>
+
#include <arm_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
-#include <tzc400.h>
/*************************************************************************
* Definitions common to all ARM Compute SubSystems (CSS)
diff --git a/include/plat/arm/css/common/css_pm.h b/include/plat/arm/css/common/css_pm.h
index ff75c69..b82ff47 100644
--- a/include/plat/arm/css/common/css_pm.h
+++ b/include/plat/arm/css/common/css_pm.h
@@ -8,9 +8,10 @@
#define CSS_PM_H
#include <cdefs.h>
-#include <psci.h>
#include <stdint.h>
+#include <lib/psci/psci.h>
+
/* Macros to read the CSS power domain state */
#define CSS_CORE_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL0]
#define CSS_CLUSTER_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL1]
diff --git a/include/plat/arm/soc/common/soc_css_def.h b/include/plat/arm/soc/common/soc_css_def.h
index 263313a..b4b6ba8 100644
--- a/include/plat/arm/soc/common/soc_css_def.h
+++ b/include/plat/arm/soc/common/soc_css_def.h
@@ -7,9 +7,8 @@
#ifndef SOC_CSS_DEF_H
#define SOC_CSS_DEF_H
-#include <common_def.h>
-#include <utils_def.h>
-
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
/*
* Definitions common to all ARM CSS SoCs
diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
index 66074ac..66c88ba 100644
--- a/include/plat/common/common_def.h
+++ b/include/plat/common/common_def.h
@@ -6,10 +6,11 @@
#ifndef COMMON_DEF_H
#define COMMON_DEF_H
-#include <bl_common.h>
#include <platform_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+
+#include <common/bl_common.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
/******************************************************************************
* Required platform porting definitions that are expected to be common to
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index 04272b1..13767ff 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -7,9 +7,10 @@
#ifndef PLATFORM_H
#define PLATFORM_H
-#include <psci.h>
#include <stdint.h>
+#include <lib/psci/psci.h>
+
/*******************************************************************************
* Forward declarations
******************************************************************************/
diff --git a/include/plat/marvell/a3700/common/armada_common.h b/include/plat/marvell/a3700/common/armada_common.h
index fdcc02a..c6953fb 100644
--- a/include/plat/marvell/a3700/common/armada_common.h
+++ b/include/plat/marvell/a3700/common/armada_common.h
@@ -8,9 +8,10 @@
#ifndef ARMADA_COMMON_H
#define ARMADA_COMMON_H
-#include <io_addr_dec.h>
#include <stdint.h>
+#include <io_addr_dec.h>
+
int marvell_get_io_dec_win_conf(struct dec_win_config **win, uint32_t *size);
#endif /* ARMADA_COMMON_H */
diff --git a/include/plat/marvell/a3700/common/marvell_def.h b/include/plat/marvell/a3700/common/marvell_def.h
index 3c105fc..229b8b0 100644
--- a/include/plat/marvell/a3700/common/marvell_def.h
+++ b/include/plat/marvell/a3700/common/marvell_def.h
@@ -8,12 +8,12 @@
#ifndef MARVELL_DEF_H
#define MARVELL_DEF_H
-#include <arch.h>
-#include <common_def.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/common_def.h>
/****************************************************************************
* Definitions common to all MARVELL standard platforms
diff --git a/include/plat/marvell/a3700/common/plat_marvell.h b/include/plat/marvell/a3700/common/plat_marvell.h
index 01e42c5..8b8b53f 100644
--- a/include/plat/marvell/a3700/common/plat_marvell.h
+++ b/include/plat/marvell/a3700/common/plat_marvell.h
@@ -8,11 +8,12 @@
#ifndef PLAT_MARVELL_H
#define PLAT_MARVELL_H
-#include <bl_common.h>
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <xlat_tables.h>
+
+#include <common/bl_common.h>
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/xlat_tables/xlat_tables.h>
/*
* Extern declarations common to Marvell standard platforms
diff --git a/include/plat/marvell/a8k/common/armada_common.h b/include/plat/marvell/a8k/common/armada_common.h
index 64d9adf..dd2a24a 100644
--- a/include/plat/marvell/a8k/common/armada_common.h
+++ b/include/plat/marvell/a8k/common/armada_common.h
@@ -8,10 +8,10 @@
#ifndef ARMADA_COMMON_H
#define ARMADA_COMMON_H
-#include <amb_adec.h>
-#include <io_win.h>
-#include <iob.h>
-#include <ccu.h>
+#include <drivers/marvell/amb_adec.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/io_win.h>
+#include <drivers/marvell/iob.h>
/*
* This struct supports skip image request
diff --git a/include/plat/marvell/a8k/common/marvell_def.h b/include/plat/marvell/a8k/common/marvell_def.h
index c67b3cd..5ba90f7 100644
--- a/include/plat/marvell/a8k/common/marvell_def.h
+++ b/include/plat/marvell/a8k/common/marvell_def.h
@@ -8,12 +8,12 @@
#ifndef MARVELL_DEF_H
#define MARVELL_DEF_H
-#include <arch.h>
-#include <common_def.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/common_def.h>
/******************************************************************************
* Definitions common to all MARVELL standard platforms
diff --git a/include/plat/marvell/a8k/common/plat_marvell.h b/include/plat/marvell/a8k/common/plat_marvell.h
index 037548d..65d4de8 100644
--- a/include/plat/marvell/a8k/common/plat_marvell.h
+++ b/include/plat/marvell/a8k/common/plat_marvell.h
@@ -8,11 +8,12 @@
#ifndef PLAT_MARVELL_H
#define PLAT_MARVELL_H
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <utils.h>
-#include <xlat_tables.h>
+
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/utils.h>
+#include <lib/xlat_tables/xlat_tables.h>
/*
* Extern declarations common to Marvell standard platforms
diff --git a/include/plat/marvell/common/aarch64/cci_macros.S b/include/plat/marvell/common/aarch64/cci_macros.S
index 96b364e..b0a909b 100644
--- a/include/plat/marvell/common/aarch64/cci_macros.S
+++ b/include/plat/marvell/common/aarch64/cci_macros.S
@@ -8,7 +8,7 @@
#ifndef CCI_MACROS_S
#define CCI_MACROS_S
-#include <cci.h>
+#include <drivers/arm/cci.h>
#include <platform_def.h>
.section .rodata.cci_reg_name, "aS"
diff --git a/include/plat/marvell/common/aarch64/marvell_macros.S b/include/plat/marvell/common/aarch64/marvell_macros.S
index c2a8bd0..bfe2d41 100644
--- a/include/plat/marvell/common/aarch64/marvell_macros.S
+++ b/include/plat/marvell/common/aarch64/marvell_macros.S
@@ -8,10 +8,10 @@
#ifndef MARVELL_MACROS_S
#define MARVELL_MACROS_S
-#include <cci.h>
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
#include <platform_def.h>
/*
diff --git a/include/plat/marvell/common/marvell_plat_priv.h b/include/plat/marvell/common/marvell_plat_priv.h
index 6f0b588..78b5331 100644
--- a/include/plat/marvell/common/marvell_plat_priv.h
+++ b/include/plat/marvell/common/marvell_plat_priv.h
@@ -8,7 +8,7 @@
#ifndef MARVELL_PLAT_PRIV_H
#define MARVELL_PLAT_PRIV_H
-#include <utils.h>
+#include <lib/utils.h>
/*****************************************************************************
* Function and variable prototypes
diff --git a/include/services/mm_svc.h b/include/services/mm_svc.h
index e2ce90f..c81e904 100644
--- a/include/services/mm_svc.h
+++ b/include/services/mm_svc.h
@@ -9,7 +9,7 @@
#if SPM_DEPRECATED
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define MM_VERSION_MAJOR U(1)
#define MM_VERSION_MAJOR_SHIFT 16
diff --git a/include/services/sdei.h b/include/services/sdei.h
index 4d0fd3f..ae8c7e4 100644
--- a/include/services/sdei.h
+++ b/include/services/sdei.h
@@ -7,8 +7,8 @@
#ifndef SDEI_H
#define SDEI_H
-#include <spinlock.h>
-#include <utils_def.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
/* Range 0xC4000020 - 0xC400003F reserved for SDE 64bit smc calls */
#define SDEI_VERSION 0xC4000020U
diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h
index 0ae6cf9..47f6368 100644
--- a/include/services/secure_partition.h
+++ b/include/services/secure_partition.h
@@ -10,7 +10,8 @@
#if SPM_DEPRECATED
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/*
* Flags used by the secure_partition_mp_info structure to describe the
diff --git a/include/services/sp_res_desc.h b/include/services/sp_res_desc.h
index dc00221..b8be72e 100644
--- a/include/services/sp_res_desc.h
+++ b/include/services/sp_res_desc.h
@@ -8,7 +8,8 @@
#define SPM_RES_DESC_H
#include <stdint.h>
-#include <sp_res_desc_def.h>
+
+#include <services/sp_res_desc_def.h>
/*******************************************************************************
* Attribute Section
diff --git a/include/services/sp_res_desc_def.h b/include/services/sp_res_desc_def.h
index 68df297..5a3c50d 100644
--- a/include/services/sp_res_desc_def.h
+++ b/include/services/sp_res_desc_def.h
@@ -7,7 +7,7 @@
#ifndef SPM_RES_DESC_DEFS_H
#define SPM_RES_DESC_DEFS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Attribute Section
diff --git a/include/services/spci_svc.h b/include/services/spci_svc.h
index eae4fb7..b82cf1e 100644
--- a/include/services/spci_svc.h
+++ b/include/services/spci_svc.h
@@ -7,8 +7,8 @@
#ifndef SPCI_SVC_H
#define SPCI_SVC_H
-#include <smccc.h>
-#include <utils_def.h>
+#include <lib/smccc.h>
+#include <lib/utils_def.h>
/* SPCI_VERSION helpers */
diff --git a/include/services/spm_svc.h b/include/services/spm_svc.h
index 763b24ea..fcb409b 100644
--- a/include/services/spm_svc.h
+++ b/include/services/spm_svc.h
@@ -9,7 +9,7 @@
#if SPM_DEPRECATED
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define SPM_VERSION_MAJOR U(0)
#define SPM_VERSION_MAJOR_SHIFT 16
diff --git a/include/services/sprt_svc.h b/include/services/sprt_svc.h
index b6b51dd..bd695e5 100644
--- a/include/services/sprt_svc.h
+++ b/include/services/sprt_svc.h
@@ -7,8 +7,8 @@
#ifndef SPRT_SVC_H
#define SPRT_SVC_H
-#include <smccc.h>
-#include <utils_def.h>
+#include <lib/smccc.h>
+#include <lib/utils_def.h>
/* SPRT_VERSION helpers */
diff --git a/include/tools_share/firmware_image_package.h b/include/tools_share/firmware_image_package.h
index 9f586b0..598d5c2 100644
--- a/include/tools_share/firmware_image_package.h
+++ b/include/tools_share/firmware_image_package.h
@@ -8,7 +8,8 @@
#define FIRMWARE_IMAGE_PACKAGE_H
#include <stdint.h>
-#include <uuid.h>
+
+#include "uuid.h"
/* This is used as a signature to validate the blob header */
#define TOC_HEADER_NAME 0xAA640001