aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-11 13:12:58 +0000
committerSandrine Bailleux <sandrine.bailleux@arm.com>2019-01-25 08:23:20 +0000
commit09a00ef98c6108fec75dafcc7dbdddacb2ee2e91 (patch)
tree77b585708a4fd850f0dac3a3f0fcaf34576fa8c9
parent9e550b6f75f064b53d74a4ad3c8672332d87451c (diff)
downloadtf-a-tests-09a00ef98c6108fec75dafcc7dbdddacb2ee2e91.tar.gz
Sanitise includes of include/drivers across codebase
Enforce full include path for includes. 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 with the same name). Change-Id: I45e912b16c9fff81f50840dad7e7f90ed6637b2a Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-rw-r--r--drivers/arm/gic/arm_gic_v2.c2
-rw-r--r--drivers/arm/gic/arm_gic_v2v3.c6
-rw-r--r--drivers/arm/gic/gic_common.c4
-rw-r--r--drivers/arm/gic/gic_v2.c6
-rw-r--r--drivers/arm/gic/gic_v3.c6
-rw-r--r--drivers/arm/pl011/aarch32/pl011_console.S5
-rw-r--r--drivers/arm/pl011/aarch64/pl011_console.S5
-rw-r--r--drivers/arm/sp805/sp805.c2
-rw-r--r--drivers/arm/timer/sp804.c6
-rw-r--r--drivers/arm/timer/system_timer.c6
-rw-r--r--drivers/io/io_fip.c4
-rw-r--r--drivers/io/io_memmap.c2
-rw-r--r--drivers/io/io_storage.c2
-rw-r--r--drivers/io/vexpress_nor/io_vexpress_nor_internal.h4
-rw-r--r--fwu/ns_bl1u/ns_bl1u.mk4
-rw-r--r--fwu/ns_bl1u/ns_bl1u_main.c2
-rw-r--r--fwu/ns_bl1u/ns_bl1u_tests.c2
-rw-r--r--fwu/ns_bl2u/ns_bl2u.mk4
-rw-r--r--include/drivers/arm/sp804.h2
-rw-r--r--include/drivers/arm/system_timer.h2
-rw-r--r--lib/irq/irq.c2
-rw-r--r--lib/power_management/hotplug/hotplug.c4
-rw-r--r--lib/power_management/suspend/tftf_suspend.c4
-rw-r--r--lib/psci/psci.c2
-rw-r--r--lib/sdei/sdei.c2
-rw-r--r--lib/stdlib/putchar.c2
-rw-r--r--plat/arm/common/arm_fwu_io_storage.c6
-rw-r--r--plat/arm/common/arm_io_storage.c4
-rw-r--r--plat/arm/common/arm_setup.c6
-rw-r--r--plat/arm/common/arm_timers.c2
-rw-r--r--plat/arm/fvp/aarch32/plat_helpers.S2
-rw-r--r--plat/arm/fvp/aarch64/plat_helpers.S2
-rw-r--r--plat/arm/fvp/plat_setup.c2
-rw-r--r--plat/arm/juno/aarch32/plat_helpers.S2
-rw-r--r--plat/arm/juno/aarch64/plat_helpers.S2
-rw-r--r--plat/arm/juno/juno_timers.c2
-rw-r--r--plat/arm/juno/plat_setup.c2
-rw-r--r--plat/arm/sgi/common/aarch64/plat_helpers.S2
-rw-r--r--plat/arm/sgi/common/plat_setup.c2
-rw-r--r--plat/common/fwu_nvm_accessors.c2
-rw-r--r--plat/common/image_loader.c6
-rw-r--r--plat/common/plat_common.c4
-rw-r--r--spm/cactus/cactus.mk2
-rw-r--r--spm/cactus/cactus_main.c4
-rw-r--r--spm/ivy/ivy.mk2
-rw-r--r--spm/ivy/ivy_main.c4
-rw-r--r--tftf/framework/debug.c2
-rw-r--r--tftf/framework/framework.mk4
-rw-r--r--tftf/framework/main.c2
-rw-r--r--tftf/framework/timer/timer_framework.c2
-rw-r--r--tftf/tests/framework_validation_tests/test_validation_irq.c2
-rw-r--r--tftf/tests/framework_validation_tests/test_validation_sgi.c2
-rw-r--r--tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c2
-rw-r--r--tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c2
-rw-r--r--tftf/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c4
-rw-r--r--tftf/tests/runtime_services/standard_service/psci/api_tests/validate_power_state/test_validate_power_state.c2
-rw-r--r--tftf/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c4
-rw-r--r--tftf/tests/runtime_services/standard_service/sdei/system_tests/test_sdei.c2
-rw-r--r--tftf/tests/runtime_services/trusted_os/tsp/test_irq_preempted_std_smc.c6
-rw-r--r--tftf/tests/runtime_services/trusted_os/tsp/test_irq_spurious_gicv2.c6
-rw-r--r--tftf/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c2
61 files changed, 96 insertions, 100 deletions
diff --git a/drivers/arm/gic/arm_gic_v2.c b/drivers/arm/gic/arm_gic_v2.c
index 025d48d34..826662632 100644
--- a/drivers/arm/gic/arm_gic_v2.c
+++ b/drivers/arm/gic/arm_gic_v2.c
@@ -8,7 +8,7 @@
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
-#include <gic_v2.h>
+#include <drivers/arm/gic_v2.h>
void arm_gic_enable_interrupts_local(void)
{
diff --git a/drivers/arm/gic/arm_gic_v2v3.c b/drivers/arm/gic/arm_gic_v2v3.c
index 576c6112b..a3f84d078 100644
--- a/drivers/arm/gic/arm_gic_v2v3.c
+++ b/drivers/arm/gic/arm_gic_v2v3.c
@@ -8,9 +8,9 @@
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
-#include <gic_common.h>
-#include <gic_v2.h>
-#include <gic_v3.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gic_v2.h>
+#include <drivers/arm/gic_v3.h>
/* Record whether a GICv3 was detected on the system */
static unsigned int gicv3_detected;
diff --git a/drivers/arm/gic/gic_common.c b/drivers/arm/gic/gic_common.c
index 207ee15ad..d9c9fcee5 100644
--- a/drivers/arm/gic/gic_common.c
+++ b/drivers/arm/gic/gic_common.c
@@ -7,8 +7,8 @@
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
-#include <gic_common.h>
-#include <gic_v3.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gic_v3.h>
#include <mmio.h>
/*******************************************************************************
diff --git a/drivers/arm/gic/gic_v2.c b/drivers/arm/gic/gic_v2.c
index 48ee29e2a..7904ed127 100644
--- a/drivers/arm/gic/gic_v2.c
+++ b/drivers/arm/gic/gic_v2.c
@@ -6,10 +6,10 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
-#include <gic_common.h>
-#include <gic_v2.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gic_v2.h>
#include <mmio.h>
#include <platform.h>
diff --git a/drivers/arm/gic/gic_v3.c b/drivers/arm/gic/gic_v3.c
index 76b08639c..5a777cb3d 100644
--- a/drivers/arm/gic/gic_v3.c
+++ b/drivers/arm/gic/gic_v3.c
@@ -6,11 +6,11 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <debug.h>
-#include <gic_common.h>
-#include <gic_v3.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gic_v3.h>
#include <mmio.h>
#include <platform.h>
diff --git a/drivers/arm/pl011/aarch32/pl011_console.S b/drivers/arm/pl011/aarch32/pl011_console.S
index 96da6f92b..4c7bfe7fb 100644
--- a/drivers/arm/pl011/aarch32/pl011_console.S
+++ b/drivers/arm/pl011/aarch32/pl011_console.S
@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <arch.h>
#include <asm_macros.S>
-#include <console.h>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/console.h>
.globl console_init
.globl console_putc
diff --git a/drivers/arm/pl011/aarch64/pl011_console.S b/drivers/arm/pl011/aarch64/pl011_console.S
index d87982a64..4e7ad2d5d 100644
--- a/drivers/arm/pl011/aarch64/pl011_console.S
+++ b/drivers/arm/pl011/aarch64/pl011_console.S
@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <arch.h>
#include <asm_macros.S>
-#include <console.h>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/console.h>
.globl console_init
.globl console_putc
diff --git a/drivers/arm/sp805/sp805.c b/drivers/arm/sp805/sp805.c
index 72a668d2c..2318c40d8 100644
--- a/drivers/arm/sp805/sp805.c
+++ b/drivers/arm/sp805/sp805.c
@@ -6,9 +6,9 @@
#include <assert.h>
#include <debug.h>
+#include <drivers/arm/sp805.h>
#include <mmio.h>
#include <platform_def.h>
-#include <sp805.h>
#include <stdint.h>
static inline uint32_t sp805_read_wdog_load(unsigned long base)
diff --git a/drivers/arm/timer/sp804.c b/drivers/arm/timer/sp804.c
index de88cda21..dba8af67f 100644
--- a/drivers/arm/timer/sp804.c
+++ b/drivers/arm/timer/sp804.c
@@ -6,11 +6,11 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
-#include <gic_v2.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_v2.h>
+#include <drivers/arm/sp804.h>
#include <mmio.h>
-#include <sp804.h>
static unsigned int sp804_freq;
static uintptr_t sp804_base;
diff --git a/drivers/arm/timer/system_timer.c b/drivers/arm/timer/system_timer.c
index 6cc3cef3a..e1f8fb076 100644
--- a/drivers/arm/timer/system_timer.c
+++ b/drivers/arm/timer/system_timer.c
@@ -6,13 +6,13 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_v2.h>
+#include <drivers/arm/system_timer.h>
#include <debug.h>
-#include <gic_v2.h>
#include <irq.h>
#include <mmio.h>
-#include <system_timer.h>
static uintptr_t g_systimer_base;
diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c
index 8b5af6ec4..6f272d94b 100644
--- a/drivers/io/io_fip.c
+++ b/drivers/io/io_fip.c
@@ -6,11 +6,11 @@
#include <assert.h>
#include <debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_fip.h>
#include <errno.h>
#include <firmware_image_package.h>
#include <image_loader.h>
-#include <io_driver.h>
-#include <io_fip.h>
#include <io_storage.h>
#include <platform.h>
#include <platform_def.h>
diff --git a/drivers/io/io_memmap.c b/drivers/io/io_memmap.c
index 3f4b2dbb6..231040bfb 100644
--- a/drivers/io/io_memmap.c
+++ b/drivers/io/io_memmap.c
@@ -6,7 +6,7 @@
#include <assert.h>
#include <debug.h>
-#include <io_driver.h>
+#include <drivers/io/io_driver.h>
#include <io_storage.h>
#include <string.h>
diff --git a/drivers/io/io_storage.c b/drivers/io/io_storage.c
index 57dc76147..9a45da2da 100644
--- a/drivers/io/io_storage.c
+++ b/drivers/io/io_storage.c
@@ -5,7 +5,7 @@
*/
#include <assert.h>
-#include <io_driver.h>
+#include <drivers/io/io_driver.h>
#include <io_storage.h>
#include <platform_def.h>
#include <stddef.h>
diff --git a/drivers/io/vexpress_nor/io_vexpress_nor_internal.h b/drivers/io/vexpress_nor/io_vexpress_nor_internal.h
index e06d492ed..328be069b 100644
--- a/drivers/io/vexpress_nor/io_vexpress_nor_internal.h
+++ b/drivers/io/vexpress_nor/io_vexpress_nor_internal.h
@@ -7,8 +7,8 @@
#ifndef __IO_VEXPRESS_NOR_INTERNAL_H__
#define __IO_VEXPRESS_NOR_INTERNAL_H__
-#include <io_driver.h>
-#include <io_nor_flash.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_nor_flash.h>
#include <io_storage.h>
#define IS_FLASH_ADDRESS_BLOCK_ALIGNED(fp, addr) \
diff --git a/fwu/ns_bl1u/ns_bl1u.mk b/fwu/ns_bl1u/ns_bl1u.mk
index d5c78069e..edc77bef5 100644
--- a/fwu/ns_bl1u/ns_bl1u.mk
+++ b/fwu/ns_bl1u/ns_bl1u.mk
@@ -10,11 +10,9 @@ include lib/compiler-rt/compiler-rt.mk
NS_BL1U_INCLUDES := \
-I${AUTOGEN_DIR} \
-Itftf/framework/include \
+ -Iinclude \
-Iinclude/common \
-Iinclude/common/${ARCH} \
- -Iinclude/drivers \
- -Iinclude/drivers/arm \
- -Iinclude/drivers/io \
-Iinclude/lib \
-Iinclude/lib/${ARCH} \
-Iinclude/lib/stdlib \
diff --git a/fwu/ns_bl1u/ns_bl1u_main.c b/fwu/ns_bl1u/ns_bl1u_main.c
index 4a15e8606..55cea903c 100644
--- a/fwu/ns_bl1u/ns_bl1u_main.c
+++ b/fwu/ns_bl1u/ns_bl1u_main.c
@@ -8,9 +8,9 @@
#include <assert.h>
#include <bl1.h>
#include <debug.h>
+#include <drivers/io/io_fip.h>
#include <errno.h>
#include <image_loader.h>
-#include <io_fip.h>
#include <io_storage.h>
#include <mmio.h>
#include <nvm.h>
diff --git a/fwu/ns_bl1u/ns_bl1u_tests.c b/fwu/ns_bl1u/ns_bl1u_tests.c
index 16ae2591a..c5e18378f 100644
--- a/fwu/ns_bl1u/ns_bl1u_tests.c
+++ b/fwu/ns_bl1u/ns_bl1u_tests.c
@@ -11,8 +11,8 @@
#include <bl1.h>
#include <debug.h>
+#include <drivers/io/io_fip.h>
#include <errno.h>
-#include <io_fip.h>
#include <platform_def.h>
#include <smccc.h>
#include <status.h>
diff --git a/fwu/ns_bl2u/ns_bl2u.mk b/fwu/ns_bl2u/ns_bl2u.mk
index abd5ac555..8c3924d30 100644
--- a/fwu/ns_bl2u/ns_bl2u.mk
+++ b/fwu/ns_bl2u/ns_bl2u.mk
@@ -10,11 +10,9 @@ include lib/compiler-rt/compiler-rt.mk
NS_BL2U_INCLUDES := \
-I${AUTOGEN_DIR} \
-Itftf/framework/include \
+ -Iinclude \
-Iinclude/common \
-Iinclude/common/${ARCH} \
- -Iinclude/drivers \
- -Iinclude/drivers/arm \
- -Iinclude/drivers/io \
-Iinclude/lib \
-Iinclude/lib/${ARCH} \
-Iinclude/lib/stdlib \
diff --git a/include/drivers/arm/sp804.h b/include/drivers/arm/sp804.h
index 7ca556762..004fb7697 100644
--- a/include/drivers/arm/sp804.h
+++ b/include/drivers/arm/sp804.h
@@ -7,6 +7,8 @@
#ifndef __SP804_H__
#define __SP804_H__
+#include <stdint.h>
+
#define SP804_LOAD_OFFSET 0x0
#define SP804_CURRENT_VALUE_OFFSET 0x4
#define SP804_CTRL_OFFSET 0x8
diff --git a/include/drivers/arm/system_timer.h b/include/drivers/arm/system_timer.h
index 8cd0c8e69..3bb5dface 100644
--- a/include/drivers/arm/system_timer.h
+++ b/include/drivers/arm/system_timer.h
@@ -7,6 +7,8 @@
#ifndef __SYSTEM_TIMER_H__
#define __SYSTEM_TIMER_H__
+#include <stdint.h>
+
/*
* Program systimer to fire an interrupt after time_out_ms
*
diff --git a/lib/irq/irq.c b/lib/irq/irq.c
index c7d671fe7..70c321b19 100644
--- a/lib/irq/irq.c
+++ b/lib/irq/irq.c
@@ -5,9 +5,9 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <irq.h>
#include <plat_topology.h>
#include <platform.h>
diff --git a/lib/power_management/hotplug/hotplug.c b/lib/power_management/hotplug/hotplug.c
index 7c3a988f8..37bfc06bf 100644
--- a/lib/power_management/hotplug/hotplug.c
+++ b/lib/power_management/hotplug/hotplug.c
@@ -5,11 +5,11 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <cdefs.h> /* For __dead2 */
-#include <console.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/console.h>
#include <irq.h>
#include <platform.h>
#include <platform_def.h>
diff --git a/lib/power_management/suspend/tftf_suspend.c b/lib/power_management/suspend/tftf_suspend.c
index d6c989afe..ee6f9caa5 100644
--- a/lib/power_management/suspend/tftf_suspend.c
+++ b/lib/power_management/suspend/tftf_suspend.c
@@ -5,9 +5,9 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
-#include <console.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/console.h>
#include <platform.h>
#include <power_management.h>
#include <psci.h>
diff --git a/lib/psci/psci.c b/lib/psci/psci.c
index 520c72435..857b01e5f 100644
--- a/lib/psci/psci.c
+++ b/lib/psci/psci.c
@@ -5,8 +5,8 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <irq.h>
#include <platform.h>
#include <power_management.h>
diff --git a/lib/sdei/sdei.c b/lib/sdei/sdei.c
index 264da28ae..157ab6cd4 100644
--- a/lib/sdei/sdei.c
+++ b/lib/sdei/sdei.c
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arm_gic.h>
#include <assert.h>
+#include <drivers/arm/arm_gic.h>
#include <sdei.h>
#include <smccc.h>
#include <stdint.h>
diff --git a/lib/stdlib/putchar.c b/lib/stdlib/putchar.c
index 6b6f75ebb..d330f5821 100644
--- a/lib/stdlib/putchar.c
+++ b/lib/stdlib/putchar.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <console.h>
+#include <drivers/console.h>
#include <stdio.h>
/* Putchar() should either return the character printed or EOF in case of error.
diff --git a/plat/arm/common/arm_fwu_io_storage.c b/plat/arm/common/arm_fwu_io_storage.c
index 184f2af4d..5af3e0600 100644
--- a/plat/arm/common/arm_fwu_io_storage.c
+++ b/plat/arm/common/arm_fwu_io_storage.c
@@ -7,11 +7,11 @@
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_fip.h>
+#include <drivers/io/io_memmap.h>
#include <firmware_image_package.h>
#include <image_loader.h>
-#include <io_driver.h>
-#include <io_fip.h>
-#include <io_memmap.h>
#include <io_storage.h>
#include <platform.h>
#include <platform_def.h>
diff --git a/plat/arm/common/arm_io_storage.c b/plat/arm/common/arm_io_storage.c
index d9d8a389c..3fdaf8c2e 100644
--- a/plat/arm/common/arm_io_storage.c
+++ b/plat/arm/common/arm_io_storage.c
@@ -5,8 +5,8 @@
*/
#include <assert.h>
-#include <io_driver.h>
-#include <io_nor_flash.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_nor_flash.h>
#include <io_storage.h>
#include <platform.h>
#include <tftf.h>
diff --git a/plat/arm/common/arm_setup.c b/plat/arm/common/arm_setup.c
index 79f463176..e345fd80a 100644
--- a/plat/arm/common/arm_setup.c
+++ b/plat/arm/common/arm_setup.c
@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arm_gic.h>
-#include <console.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/console.h>
#include <io_storage.h>
-#include <pl011.h>
#include <plat_arm.h>
#include <platform.h>
#include <platform_def.h>
diff --git a/plat/arm/common/arm_timers.c b/plat/arm/common/arm_timers.c
index c84cb845a..f43fdaa0c 100644
--- a/plat/arm/common/arm_timers.c
+++ b/plat/arm/common/arm_timers.c
@@ -5,9 +5,9 @@
*/
#include <assert.h>
+#include <drivers/arm/system_timer.h>
#include <platform.h>
#include <stddef.h>
-#include <system_timer.h>
#include <timer.h>
#pragma weak plat_initialise_timer_ops
diff --git a/plat/arm/fvp/aarch32/plat_helpers.S b/plat/arm/fvp/aarch32/plat_helpers.S
index 1d923ad68..5865aaa15 100644
--- a/plat/arm/fvp/aarch32/plat_helpers.S
+++ b/plat/arm/fvp/aarch32/plat_helpers.S
@@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#include "../fvp_def.h"
.globl platform_get_core_pos
diff --git a/plat/arm/fvp/aarch64/plat_helpers.S b/plat/arm/fvp/aarch64/plat_helpers.S
index 4bd9f3d67..18cbbd4dc 100644
--- a/plat/arm/fvp/aarch64/plat_helpers.S
+++ b/plat/arm/fvp/aarch64/plat_helpers.S
@@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#include "../fvp_def.h"
.globl platform_get_core_pos
diff --git a/plat/arm/fvp/plat_setup.c b/plat/arm/fvp/plat_setup.c
index 0d816863a..fa978142b 100644
--- a/plat/arm/fvp/plat_setup.c
+++ b/plat/arm/fvp/plat_setup.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arm_gic.h>
+#include <drivers/arm/arm_gic.h>
#include <plat_arm.h>
#include <platform.h>
diff --git a/plat/arm/juno/aarch32/plat_helpers.S b/plat/arm/juno/aarch32/plat_helpers.S
index 99fedb485..68fb67ab1 100644
--- a/plat/arm/juno/aarch32/plat_helpers.S
+++ b/plat/arm/juno/aarch32/plat_helpers.S
@@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#include "../juno_def.h"
.globl platform_get_core_pos
diff --git a/plat/arm/juno/aarch64/plat_helpers.S b/plat/arm/juno/aarch64/plat_helpers.S
index 1efee4fbd..c221f6e0a 100644
--- a/plat/arm/juno/aarch64/plat_helpers.S
+++ b/plat/arm/juno/aarch64/plat_helpers.S
@@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#include "../juno_def.h"
.globl platform_get_core_pos
diff --git a/plat/arm/juno/juno_timers.c b/plat/arm/juno/juno_timers.c
index 1d1ce4884..604a2ddd9 100644
--- a/plat/arm/juno/juno_timers.c
+++ b/plat/arm/juno/juno_timers.c
@@ -5,9 +5,9 @@
*/
#include <assert.h>
+#include <drivers/arm/sp804.h>
#include <platform.h>
#include <platform_def.h>
-#include <sp804.h>
#include <stddef.h>
#include <timer.h>
diff --git a/plat/arm/juno/plat_setup.c b/plat/arm/juno/plat_setup.c
index 8792cb343..324c9e669 100644
--- a/plat/arm/juno/plat_setup.c
+++ b/plat/arm/juno/plat_setup.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arm_gic.h>
+#include <drivers/arm/arm_gic.h>
#include <mmio.h>
#include <plat_arm.h>
#include <platform.h>
diff --git a/plat/arm/sgi/common/aarch64/plat_helpers.S b/plat/arm/sgi/common/aarch64/plat_helpers.S
index 056a2f59c..9fe2ba962 100644
--- a/plat/arm/sgi/common/aarch64/plat_helpers.S
+++ b/plat/arm/sgi/common/aarch64/plat_helpers.S
@@ -5,7 +5,7 @@
*/
#include <asm_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#include <platform_def.h>
.globl platform_get_core_pos
diff --git a/plat/arm/sgi/common/plat_setup.c b/plat/arm/sgi/common/plat_setup.c
index 211e8d41c..4b15f1a7e 100644
--- a/plat/arm/sgi/common/plat_setup.c
+++ b/plat/arm/sgi/common/plat_setup.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arm_gic.h>
+#include <drivers/arm/arm_gic.h>
#include <xlat_tables_v2.h>
static const mmap_region_t mmap[] = {
diff --git a/plat/common/fwu_nvm_accessors.c b/plat/common/fwu_nvm_accessors.c
index 5b32151d4..ec8bb7196 100644
--- a/plat/common/fwu_nvm_accessors.c
+++ b/plat/common/fwu_nvm_accessors.c
@@ -6,9 +6,9 @@
#include <assert.h>
#include <debug.h>
+#include <drivers/io/io_fip.h>
#include <firmware_image_package.h>
#include <fwu_nvm.h>
-#include <io_fip.h>
#include <io_storage.h>
#include <platform.h>
#include <platform_def.h>
diff --git a/plat/common/image_loader.c b/plat/common/image_loader.c
index 9b27f6f45..ffc997a44 100644
--- a/plat/common/image_loader.c
+++ b/plat/common/image_loader.c
@@ -7,11 +7,11 @@
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_fip.h>
+#include <drivers/io/io_memmap.h>
#include <firmware_image_package.h>
#include <image_loader.h>
-#include <io_driver.h>
-#include <io_fip.h>
-#include <io_memmap.h>
#include <io_storage.h>
#include <platform.h>
#include <platform_def.h>
diff --git a/plat/common/plat_common.c b/plat/common/plat_common.c
index 571387111..c5f4592c7 100644
--- a/plat/common/plat_common.c
+++ b/plat/common/plat_common.c
@@ -5,10 +5,10 @@
*/
#include <arch_helpers.h>
-#include <console.h>
#include <debug.h>
+#include <drivers/arm/sp805.h>
+#include <drivers/console.h>
#include <platform.h>
-#include <sp805.h>
#include <xlat_tables_v2.h>
/*
diff --git a/spm/cactus/cactus.mk b/spm/cactus/cactus.mk
index 03d809d10..056b4a7af 100644
--- a/spm/cactus/cactus.mk
+++ b/spm/cactus/cactus.mk
@@ -12,8 +12,6 @@ CACTUS_INCLUDES := \
-Iinclude \
-Iinclude/common \
-Iinclude/common/${ARCH} \
- -Iinclude/drivers \
- -Iinclude/drivers/arm \
-Iinclude/lib \
-Iinclude/lib/${ARCH} \
-Iinclude/lib/stdlib \
diff --git a/spm/cactus/cactus_main.c b/spm/cactus/cactus_main.c
index a062ef011..4580f23eb 100644
--- a/spm/cactus/cactus_main.c
+++ b/spm/cactus/cactus_main.c
@@ -6,10 +6,10 @@
#include <assert.h>
#include <cactus_def.h>
-#include <console.h>
#include <debug.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/console.h>
#include <errno.h>
-#include <pl011.h>
#include <plat_arm.h>
#include <platform_def.h>
#include <sp_helpers.h>
diff --git a/spm/ivy/ivy.mk b/spm/ivy/ivy.mk
index c7726f4fd..244d20969 100644
--- a/spm/ivy/ivy.mk
+++ b/spm/ivy/ivy.mk
@@ -12,8 +12,6 @@ IVY_INCLUDES := \
-Iinclude \
-Iinclude/common \
-Iinclude/common/${ARCH} \
- -Iinclude/drivers \
- -Iinclude/drivers/arm \
-Iinclude/lib \
-Iinclude/lib/${ARCH} \
-Iinclude/lib/stdlib \
diff --git a/spm/ivy/ivy_main.c b/spm/ivy/ivy_main.c
index 1f1c5e4db..8542150ba 100644
--- a/spm/ivy/ivy_main.c
+++ b/spm/ivy/ivy_main.c
@@ -5,11 +5,11 @@
*/
#include <assert.h>
-#include <console.h>
#include <debug.h>
+#include <drivers/console.h>
+#include <drivers/arm/pl011.h>
#include <errno.h>
#include <ivy_def.h>
-#include <pl011.h>
#include <plat_arm.h>
#include <platform_def.h>
#include <sp_helpers.h>
diff --git a/tftf/framework/debug.c b/tftf/framework/debug.c
index 0927ed474..66fc03bf0 100644
--- a/tftf/framework/debug.c
+++ b/tftf/framework/debug.c
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <console.h>
#include <debug.h>
+#include <drivers/console.h>
void __attribute__((__noreturn__)) do_panic(const char *file, int line)
{
diff --git a/tftf/framework/framework.mk b/tftf/framework/framework.mk
index 81061d45c..4e5dc2e65 100644
--- a/tftf/framework/framework.mk
+++ b/tftf/framework/framework.mk
@@ -12,11 +12,9 @@ include lib/compiler-rt/compiler-rt.mk
TFTF_INCLUDES := \
-I${AUTOGEN_DIR} \
-Itftf/framework/include \
+ -Iinclude \
-Iinclude/common \
-Iinclude/common/${ARCH} \
- -Iinclude/drivers \
- -Iinclude/drivers/arm \
- -Iinclude/drivers/io \
-Iinclude/lib \
-Iinclude/lib/${ARCH} \
-Iinclude/lib/extensions \
diff --git a/tftf/framework/main.c b/tftf/framework/main.c
index 02b54386e..7f987c059 100644
--- a/tftf/framework/main.c
+++ b/tftf/framework/main.c
@@ -5,9 +5,9 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <irq.h>
#include <mmio.h>
#include <nvm.h>
diff --git a/tftf/framework/timer/timer_framework.c b/tftf/framework/timer/timer_framework.c
index 0b0a7a53a..38106cfc7 100644
--- a/tftf/framework/timer/timer_framework.c
+++ b/tftf/framework/timer/timer_framework.c
@@ -6,8 +6,8 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <errno.h>
#include <irq.h>
#include <mmio.h>
diff --git a/tftf/tests/framework_validation_tests/test_validation_irq.c b/tftf/tests/framework_validation_tests/test_validation_irq.c
index 2e9e37322..67f5c295b 100644
--- a/tftf/tests/framework_validation_tests/test_validation_irq.c
+++ b/tftf/tests/framework_validation_tests/test_validation_irq.c
@@ -5,7 +5,7 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
+#include <drivers/arm/arm_gic.h>
#include <irq.h>
#include <platform.h>
#include <sgi.h>
diff --git a/tftf/tests/framework_validation_tests/test_validation_sgi.c b/tftf/tests/framework_validation_tests/test_validation_sgi.c
index 806bc581f..7f81b2b26 100644
--- a/tftf/tests/framework_validation_tests/test_validation_sgi.c
+++ b/tftf/tests/framework_validation_tests/test_validation_sgi.c
@@ -5,8 +5,8 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <irq.h>
#include <platform.h>
#include <sgi.h>
diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c
index 5f9393d12..9afd91027 100644
--- a/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c
+++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c
@@ -6,8 +6,8 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
+#include <drivers/arm/arm_gic.h>
#include <events.h>
#include <irq.h>
#include <plat_topology.h>
diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c
index 64f6c81e6..4732796c1 100644
--- a/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c
+++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c
@@ -6,10 +6,10 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <cassert.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <events.h>
#include <irq.h>
#include <math_utils.h>
diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c
index 78e8799b2..afb352b4d 100644
--- a/tftf/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c
+++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/system_suspend/test_psci_system_suspend.c
@@ -6,11 +6,11 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_v2.h>
#include <events.h>
-#include <gic_v2.h>
#include <irq.h>
#include <plat_topology.h>
#include <platform.h>
diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/validate_power_state/test_validate_power_state.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/validate_power_state/test_validate_power_state.c
index 55de1fa89..1690ca361 100644
--- a/tftf/tests/runtime_services/standard_service/psci/api_tests/validate_power_state/test_validate_power_state.c
+++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/validate_power_state/test_validate_power_state.c
@@ -5,8 +5,8 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <events.h>
#include <irq.h>
#include <plat_topology.h>
diff --git a/tftf/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c b/tftf/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c
index 5b500beb7..6f629e816 100644
--- a/tftf/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c
+++ b/tftf/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c
@@ -6,11 +6,11 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_v2.h>
#include <events.h>
-#include <gic_v2.h>
#include <irq.h>
#include <plat_topology.h>
#include <platform.h>
diff --git a/tftf/tests/runtime_services/standard_service/sdei/system_tests/test_sdei.c b/tftf/tests/runtime_services/standard_service/sdei/system_tests/test_sdei.c
index dc357c16a..ca8b63d2d 100644
--- a/tftf/tests/runtime_services/standard_service/sdei/system_tests/test_sdei.c
+++ b/tftf/tests/runtime_services/standard_service/sdei/system_tests/test_sdei.c
@@ -6,11 +6,11 @@
#include <arch_helpers.h>
#include <debug.h>
+#include <drivers/arm/private_timer.h>
#include <events.h>
#include <plat_topology.h>
#include <platform.h>
#include <power_management.h>
-#include <private_timer.h>
#include <sdei.h>
#include <tftf_lib.h>
#include <timer.h>
diff --git a/tftf/tests/runtime_services/trusted_os/tsp/test_irq_preempted_std_smc.c b/tftf/tests/runtime_services/trusted_os/tsp/test_irq_preempted_std_smc.c
index b8bfcfe5e..c206c3d2a 100644
--- a/tftf/tests/runtime_services/trusted_os/tsp/test_irq_preempted_std_smc.c
+++ b/tftf/tests/runtime_services/trusted_os/tsp/test_irq_preempted_std_smc.c
@@ -5,11 +5,11 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gic_v2.h>
#include <events.h>
-#include <gic_common.h>
-#include <gic_v2.h>
#include <irq.h>
#include <plat_topology.h>
#include <platform.h>
diff --git a/tftf/tests/runtime_services/trusted_os/tsp/test_irq_spurious_gicv2.c b/tftf/tests/runtime_services/trusted_os/tsp/test_irq_spurious_gicv2.c
index 6eaf0465a..a52f67a36 100644
--- a/tftf/tests/runtime_services/trusted_os/tsp/test_irq_spurious_gicv2.c
+++ b/tftf/tests/runtime_services/trusted_os/tsp/test_irq_spurious_gicv2.c
@@ -5,11 +5,11 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gic_v2.h>
#include <events.h>
-#include <gic_common.h>
-#include <gic_v2.h>
#include <irq.h>
#include <plat_topology.h>
#include <platform.h>
diff --git a/tftf/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c b/tftf/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c
index 0128ffae8..19f37812d 100644
--- a/tftf/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c
+++ b/tftf/tests/runtime_services/trusted_os/tsp/test_normal_int_switch.c
@@ -5,9 +5,9 @@
*/
#include <arch_helpers.h>
-#include <arm_gic.h>
#include <assert.h>
#include <debug.h>
+#include <drivers/arm/arm_gic.h>
#include <irq.h>
#include <mmio.h>
#include <platform.h>