aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/allwinner/sunxi_rsb.c8
-rw-r--r--drivers/arm/cci/cci.c11
-rw-r--r--drivers/arm/ccn/ccn.c12
-rw-r--r--drivers/arm/gic/common/gic_common.c6
-rw-r--r--drivers/arm/gic/common/gic_common_private.h5
-rw-r--r--drivers/arm/gic/v2/gicv2_helpers.c12
-rw-r--r--drivers/arm/gic/v2/gicv2_main.c15
-rw-r--r--drivers/arm/gic/v2/gicv2_private.h5
-rw-r--r--drivers/arm/gic/v3/arm_gicv3_common.c7
-rw-r--r--drivers/arm/gic/v3/gic600.c5
-rw-r--r--drivers/arm/gic/v3/gicv3_helpers.c10
-rw-r--r--drivers/arm/gic/v3/gicv3_main.c12
-rw-r--r--drivers/arm/gic/v3/gicv3_private.h8
-rw-r--r--drivers/arm/pl011/aarch32/pl011_console.S2
-rw-r--r--drivers/arm/pl011/aarch64/pl011_console.S2
-rw-r--r--drivers/arm/pl061/pl061_gpio.c13
-rw-r--r--drivers/arm/smmu/smmu_v3.c5
-rw-r--r--drivers/arm/sp804/sp804_delay_timer.c5
-rw-r--r--drivers/arm/sp805/sp805.c5
-rw-r--r--drivers/arm/tzc/tzc380.c7
-rw-r--r--drivers/arm/tzc/tzc400.c8
-rw-r--r--drivers/arm/tzc/tzc_common_private.h4
-rw-r--r--drivers/arm/tzc/tzc_dmc500.c10
-rw-r--r--drivers/arm/tzc/tzc_dmc620.c7
-rw-r--r--drivers/auth/auth_mod.c18
-rw-r--r--drivers/auth/crypto_mod.c5
-rw-r--r--drivers/auth/cryptocell/cryptocell_crypto.c26
-rw-r--r--drivers/auth/cryptocell/cryptocell_crypto.mk4
-rw-r--r--drivers/auth/img_parser_mod.c9
-rw-r--r--drivers/auth/mbedtls/mbedtls_common.c12
-rw-r--r--drivers/auth/mbedtls/mbedtls_common.mk3
-rw-r--r--drivers/auth/mbedtls/mbedtls_crypto.c9
-rw-r--r--drivers/auth/mbedtls/mbedtls_x509_parser.c9
-rw-r--r--drivers/auth/tbbr/tbbr_cot.c7
-rw-r--r--drivers/cadence/uart/aarch64/cdns_console.S2
-rw-r--r--drivers/cfi/v2m/v2m_flash.c5
-rw-r--r--drivers/console/multi_console.c1
-rw-r--r--drivers/coreboot/cbmem_console/aarch64/cbmem_console.S2
-rw-r--r--drivers/delay_timer/delay_timer.c6
-rw-r--r--drivers/delay_timer/generic_delay_timer.c13
-rw-r--r--drivers/gpio/gpio.c3
-rw-r--r--drivers/imx/timer/imx_gpt.c6
-rw-r--r--drivers/imx/uart/imx_uart.c8
-rw-r--r--drivers/imx/usdhc/imx_usdhc.c16
-rw-r--r--drivers/imx/usdhc/imx_usdhc.h2
-rw-r--r--drivers/io/io_block.c14
-rw-r--r--drivers/io/io_dummy.c9
-rw-r--r--drivers/io/io_fip.c22
-rw-r--r--drivers/io/io_memmap.c14
-rw-r--r--drivers/io/io_semihosting.c10
-rw-r--r--drivers/io/io_storage.c7
-rw-r--r--drivers/marvell/amb_adec.c5
-rw-r--r--drivers/marvell/ap807_clocks_init.c7
-rw-r--r--drivers/marvell/cache_llc.c10
-rw-r--r--drivers/marvell/ccu.c7
-rw-r--r--drivers/marvell/comphy/phy-comphy-3700.c11
-rw-r--r--drivers/marvell/comphy/phy-comphy-cp110.c10
-rw-r--r--drivers/marvell/gwin.c7
-rw-r--r--drivers/marvell/io_win.c7
-rw-r--r--drivers/marvell/iob.c9
-rw-r--r--drivers/marvell/mc_trustzone/mc_trustzone.c8
-rw-r--r--drivers/marvell/mc_trustzone/mc_trustzone.h2
-rw-r--r--drivers/marvell/mci.c9
-rw-r--r--drivers/marvell/mochi/ap807_setup.c15
-rw-r--r--drivers/marvell/mochi/apn806_setup.c15
-rw-r--r--drivers/marvell/mochi/cp110_setup.c11
-rw-r--r--drivers/marvell/thermal.c4
-rw-r--r--drivers/marvell/uart/a3700_console.S2
-rw-r--r--drivers/mentor/i2c/mi2cv.c10
-rw-r--r--drivers/meson/console/aarch64/meson_console.S2
-rw-r--r--drivers/mmc/mmc.c11
-rw-r--r--drivers/partition/gpt.c7
-rw-r--r--drivers/partition/partition.c13
-rw-r--r--drivers/renesas/rcar/auth/auth_mod.c12
-rw-r--r--drivers/renesas/rcar/avs/avs_driver.c7
-rw-r--r--drivers/renesas/rcar/board/board.c5
-rw-r--r--drivers/renesas/rcar/common.c3
-rw-r--r--drivers/renesas/rcar/console/rcar_printf.c16
-rw-r--r--drivers/renesas/rcar/cpld/ulcb_cpld.c2
-rw-r--r--drivers/renesas/rcar/delay/micro_delay.h2
-rw-r--r--drivers/renesas/rcar/dma/dma_driver.c8
-rw-r--r--drivers/renesas/rcar/emmc/emmc_cmd.c3
-rw-r--r--drivers/renesas/rcar/emmc/emmc_init.c4
-rw-r--r--drivers/renesas/rcar/emmc/emmc_interrupt.c6
-rw-r--r--drivers/renesas/rcar/emmc/emmc_mount.c5
-rw-r--r--drivers/renesas/rcar/emmc/emmc_read.c2
-rw-r--r--drivers/renesas/rcar/emmc/emmc_utility.c3
-rw-r--r--drivers/renesas/rcar/iic_dvfs/iic_dvfs.c5
-rw-r--r--drivers/renesas/rcar/io/io_emmcdrv.c7
-rw-r--r--drivers/renesas/rcar/io/io_memdrv.c7
-rw-r--r--drivers/renesas/rcar/io/io_rcar.c24
-rw-r--r--drivers/renesas/rcar/pwrc/pwrc.c14
-rw-r--r--drivers/renesas/rcar/rom/rom_api.c4
-rw-r--r--drivers/renesas/rcar/rpc/rpc_driver.c6
-rw-r--r--drivers/renesas/rcar/watchdog/swdt.c7
-rw-r--r--drivers/st/clk/stm32mp1_clk.c31
-rw-r--r--drivers/st/clk/stm32mp1_clkfunc.c9
-rw-r--r--drivers/st/ddr/stm32mp1_ddr.c27
-rw-r--r--drivers/st/ddr/stm32mp1_ddr_helpers.c7
-rw-r--r--drivers/st/ddr/stm32mp1_ram.c24
-rw-r--r--drivers/st/gpio/stm32_gpio.c9
-rw-r--r--drivers/st/io/io_mmc.c13
-rw-r--r--drivers/st/io/io_stm32image.c19
-rw-r--r--drivers/st/mmc/stm32_sdmmc2.c28
-rw-r--r--drivers/st/pmic/stm32_i2c.c9
-rw-r--r--drivers/st/pmic/stm32mp1_pmic.c24
-rw-r--r--drivers/st/pmic/stpmu1.c7
-rw-r--r--drivers/st/reset/stm32mp1_reset.c14
-rw-r--r--drivers/st/uart/aarch32/stm32_console.S4
-rw-r--r--drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c4
-rw-r--r--drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram.c6
-rw-r--r--drivers/staging/renesas/rcar/ddr/dram_sub_func.c5
-rw-r--r--drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c4
-rw-r--r--drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v1.c4
-rw-r--r--drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v2.c4
-rw-r--r--drivers/staging/renesas/rcar/pfc/M3/pfc_init_m3.c4
-rw-r--r--drivers/staging/renesas/rcar/pfc/M3N/pfc_init_m3n.c4
-rw-r--r--drivers/staging/renesas/rcar/pfc/pfc_init.c6
-rw-r--r--drivers/staging/renesas/rcar/qos/E3/qos_init_e3_v10.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v10.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v11.c5
-rw-r--r--drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v20.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v30.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/H3/qos_init_h3n_v30.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v10.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v11.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/M3N/qos_init_m3n_v10.c4
-rw-r--r--drivers/staging/renesas/rcar/qos/qos_init.c6
-rw-r--r--drivers/synopsys/emmc/dw_mmc.c15
-rw-r--r--drivers/synopsys/ufs/dw_ufs.c9
-rw-r--r--drivers/ti/uart/aarch64/16550_console.S2
-rw-r--r--drivers/ufs/ufs.c14
132 files changed, 646 insertions, 463 deletions
diff --git a/drivers/allwinner/sunxi_rsb.c b/drivers/allwinner/sunxi_rsb.c
index 7075c674d..67f5b7ec2 100644
--- a/drivers/allwinner/sunxi_rsb.c
+++ b/drivers/allwinner/sunxi_rsb.c
@@ -4,10 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
#include <sunxi_mmap.h>
#define RSB_CTRL 0x00
diff --git a/drivers/arm/cci/cci.c b/drivers/arm/cci/cci.c
index 605971cac..a139f6cc7 100644
--- a/drivers/arm/cci/cci.c
+++ b/drivers/arm/cci/cci.c
@@ -4,15 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <cci.h>
-#include <debug.h>
-#include <mmio.h>
#include <stdbool.h>
#include <stdint.h>
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/arm/cci.h>
+#include <lib/mmio.h>
+
#define MAKE_CCI_PART_NUMBER(hi, lo) (((hi) << 8) | (lo))
#define CCI_PART_LO_MASK U(0xff)
#define CCI_PART_HI_MASK U(0xf)
diff --git a/drivers/arm/ccn/ccn.c b/drivers/arm/ccn/ccn.c
index d46e02089..64b162697 100644
--- a/drivers/arm/ccn/ccn.c
+++ b/drivers/arm/ccn/ccn.c
@@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
#include <assert.h>
-#include <bakery_lock.h>
-#include <ccn.h>
-#include <debug.h>
#include <errno.h>
-#include <mmio.h>
#include <stdbool.h>
+
+#include <arch.h>
+#include <common/debug.h>
+#include <drivers/arm/ccn.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
#include "ccn_private.h"
static const ccn_desc_t *ccn_plat_desc;
diff --git a/drivers/arm/gic/common/gic_common.c b/drivers/arm/gic/common/gic_common.c
index 589de5da4..38b2f6719 100644
--- a/drivers/arm/gic/common/gic_common.c
+++ b/drivers/arm/gic/common/gic_common.c
@@ -5,8 +5,10 @@
*/
#include <assert.h>
-#include <gic_common.h>
-#include <mmio.h>
+
+#include <drivers/arm/gic_common.h>
+#include <lib/mmio.h>
+
#include "gic_common_private.h"
/*******************************************************************************
diff --git a/drivers/arm/gic/common/gic_common_private.h b/drivers/arm/gic/common/gic_common_private.h
index 9d9e8c7ba..1ab1bdbef 100644
--- a/drivers/arm/gic/common/gic_common_private.h
+++ b/drivers/arm/gic/common/gic_common_private.h
@@ -7,10 +7,11 @@
#ifndef GIC_COMMON_PRIVATE_H
#define GIC_COMMON_PRIVATE_H
-#include <gic_common.h>
-#include <mmio.h>
#include <stdint.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/mmio.h>
+
/*******************************************************************************
* GIC Distributor interface register accessors that are common to GICv3 & GICv2
******************************************************************************/
diff --git a/drivers/arm/gic/v2/gicv2_helpers.c b/drivers/arm/gic/v2/gicv2_helpers.c
index bc4c1d165..6739a782c 100644
--- a/drivers/arm/gic/v2/gicv2_helpers.c
+++ b/drivers/arm/gic/v2/gicv2_helpers.c
@@ -4,13 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <assert.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <assert.h>
-#include <debug.h>
-#include <gic_common.h>
-#include <gicv2.h>
-#include <interrupt_props.h>
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+
#include "../common/gic_common_private.h"
#include "gicv2_private.h"
diff --git a/drivers/arm/gic/v2/gicv2_main.c b/drivers/arm/gic/v2/gicv2_main.c
index b8729056d..c5d4fe1c3 100644
--- a/drivers/arm/gic/v2/gicv2_main.c
+++ b/drivers/arm/gic/v2/gicv2_main.c
@@ -4,16 +4,17 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <gic_common.h>
-#include <gicv2.h>
-#include <interrupt_props.h>
-#include <spinlock.h>
#include <stdbool.h>
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <lib/spinlock.h>
+
#include "../common/gic_common_private.h"
#include "gicv2_private.h"
diff --git a/drivers/arm/gic/v2/gicv2_private.h b/drivers/arm/gic/v2/gicv2_private.h
index ccfad78cd..0fbdab0a2 100644
--- a/drivers/arm/gic/v2/gicv2_private.h
+++ b/drivers/arm/gic/v2/gicv2_private.h
@@ -7,10 +7,11 @@
#ifndef GICV2_PRIVATE_H
#define GICV2_PRIVATE_H
-#include <gicv2.h>
-#include <mmio.h>
#include <stdint.h>
+#include <drivers/arm/gicv2.h>
+#include <lib/mmio.h>
+
/*******************************************************************************
* Private function prototypes
******************************************************************************/
diff --git a/drivers/arm/gic/v3/arm_gicv3_common.c b/drivers/arm/gic/v3/arm_gicv3_common.c
index c80973295..448989286 100644
--- a/drivers/arm/gic/v3/arm_gicv3_common.c
+++ b/drivers/arm/gic/v3/arm_gicv3_common.c
@@ -10,12 +10,13 @@
* APIs that are different to those generic ones in GICv3 driver.
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <gicv3.h>
+
+#include <arch_helpers.h>
+#include <drivers/arm/arm_gicv3_common.h>
+#include <drivers/arm/gicv3.h>
#include "gicv3_private.h"
-#include "arm_gicv3_common.h"
/*
* Flush the internal GIC cache of the LPIs pending tables to memory before
diff --git a/drivers/arm/gic/v3/gic600.c b/drivers/arm/gic/v3/gic600.c
index eb4fc548f..9cb2ab25e 100644
--- a/drivers/arm/gic/v3/gic600.c
+++ b/drivers/arm/gic/v3/gic600.c
@@ -11,9 +11,10 @@
* GIC600 supports independently power-gating redistributor interface.
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <gicv3.h>
+
+#include <arch_helpers.h>
+#include <drivers/arm/gicv3.h>
#include "gicv3_private.h"
diff --git a/drivers/arm/gic/v3/gicv3_helpers.c b/drivers/arm/gic/v3/gicv3_helpers.c
index c12a4b651..39ea2a374 100644
--- a/drivers/arm/gic/v3/gicv3_helpers.c
+++ b/drivers/arm/gic/v3/gicv3_helpers.c
@@ -4,12 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <assert.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <assert.h>
-#include <debug.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+
#include "../common/gic_common_private.h"
#include "gicv3_private.h"
diff --git a/drivers/arm/gic/v3/gicv3_main.c b/drivers/arm/gic/v3/gicv3_main.c
index 60f2e108a..cf92f10ba 100644
--- a/drivers/arm/gic/v3/gicv3_main.c
+++ b/drivers/arm/gic/v3/gicv3_main.c
@@ -4,13 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <assert.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <assert.h>
-#include <debug.h>
-#include <gicv3.h>
-#include <interrupt_props.h>
-#include <spinlock.h>
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gicv3.h>
+#include <lib/spinlock.h>
+
#include "gicv3_private.h"
const gicv3_driver_data_t *gicv3_driver_data;
diff --git a/drivers/arm/gic/v3/gicv3_private.h b/drivers/arm/gic/v3/gicv3_private.h
index 188e71168..92066e1f2 100644
--- a/drivers/arm/gic/v3/gicv3_private.h
+++ b/drivers/arm/gic/v3/gicv3_private.h
@@ -8,10 +8,12 @@
#define GICV3_PRIVATE_H
#include <assert.h>
-#include <gic_common.h>
-#include <gicv3.h>
-#include <mmio.h>
#include <stdint.h>
+
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv3.h>
+#include <lib/mmio.h>
+
#include "../common/gic_common_private.h"
/*******************************************************************************
diff --git a/drivers/arm/pl011/aarch32/pl011_console.S b/drivers/arm/pl011/aarch32/pl011_console.S
index 5d6b95fe3..ae613b134 100644
--- a/drivers/arm/pl011/aarch32/pl011_console.S
+++ b/drivers/arm/pl011/aarch32/pl011_console.S
@@ -8,7 +8,7 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#if !MULTI_CONSOLE_API
/*
diff --git a/drivers/arm/pl011/aarch64/pl011_console.S b/drivers/arm/pl011/aarch64/pl011_console.S
index 7fec0904d..aaa39c11c 100644
--- a/drivers/arm/pl011/aarch64/pl011_console.S
+++ b/drivers/arm/pl011/aarch64/pl011_console.S
@@ -8,7 +8,7 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
-#include <pl011.h>
+#include <drivers/arm/pl011.h>
#if !MULTI_CONSOLE_API
/*
diff --git a/drivers/arm/pl061/pl061_gpio.c b/drivers/arm/pl061/pl061_gpio.c
index af980e5eb..97013e83f 100644
--- a/drivers/arm/pl061/pl061_gpio.c
+++ b/drivers/arm/pl061/pl061_gpio.c
@@ -9,13 +9,14 @@
*/
#include <assert.h>
-#include <cassert.h>
-#include <debug.h>
#include <errno.h>
-#include <gpio.h>
-#include <mmio.h>
-#include <pl061_gpio.h>
-#include <utils.h>
+
+#include <common/debug.h>
+#include <drivers/arm/pl061_gpio.h>
+#include <drivers/gpio.h>
+#include <lib/cassert.h>
+#include <lib/mmio.h>
+#include <lib/utils.h>
#if !PLAT_PL061_MAX_GPIOS
# define PLAT_PL061_MAX_GPIOS 32
diff --git a/drivers/arm/smmu/smmu_v3.c b/drivers/arm/smmu/smmu_v3.c
index 78a9ffa6d..004e81e36 100644
--- a/drivers/arm/smmu/smmu_v3.c
+++ b/drivers/arm/smmu/smmu_v3.c
@@ -5,10 +5,11 @@
*/
#include <cdefs.h>
-#include <mmio.h>
-#include <smmu_v3.h>
#include <stdbool.h>
+#include <drivers/arm/smmu_v3.h>
+#include <lib/mmio.h>
+
static inline uint32_t __init smmuv3_read_s_idr1(uintptr_t base)
{
return mmio_read_32(base + SMMU_S_IDR1);
diff --git a/drivers/arm/sp804/sp804_delay_timer.c b/drivers/arm/sp804/sp804_delay_timer.c
index 8f1c5c51b..5313fbde2 100644
--- a/drivers/arm/sp804/sp804_delay_timer.c
+++ b/drivers/arm/sp804/sp804_delay_timer.c
@@ -5,8 +5,9 @@
*/
#include <assert.h>
-#include <delay_timer.h>
-#include <mmio.h>
+
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
uintptr_t sp804_base_addr;
diff --git a/drivers/arm/sp805/sp805.c b/drivers/arm/sp805/sp805.c
index aee90164a..ffca1ced5 100644
--- a/drivers/arm/sp805/sp805.c
+++ b/drivers/arm/sp805/sp805.c
@@ -4,10 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
-#include <sp805.h>
#include <stdint.h>
+#include <drivers/arm/sp805.h>
+#include <lib/mmio.h>
+
/* Inline register access functions */
static inline void sp805_write_wdog_load(uintptr_t base, uint32_t value)
diff --git a/drivers/arm/tzc/tzc380.c b/drivers/arm/tzc/tzc380.c
index 082161fe5..676df8d80 100644
--- a/drivers/arm/tzc/tzc380.c
+++ b/drivers/arm/tzc/tzc380.c
@@ -5,10 +5,11 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <mmio.h>
#include <stddef.h>
-#include <tzc380.h>
+
+#include <common/debug.h>
+#include <drivers/arm/tzc380.h>
+#include <lib/mmio.h>
struct tzc380_instance {
uintptr_t base;
diff --git a/drivers/arm/tzc/tzc400.c b/drivers/arm/tzc/tzc400.c
index d27b01029..50d670139 100644
--- a/drivers/arm/tzc/tzc400.c
+++ b/drivers/arm/tzc/tzc400.c
@@ -5,10 +5,12 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <mmio.h>
#include <stddef.h>
-#include <tzc400.h>
+
+#include <common/debug.h>
+#include <drivers/arm/tzc400.h>
+#include <lib/mmio.h>
+
#include "tzc_common_private.h"
/*
diff --git a/drivers/arm/tzc/tzc_common_private.h b/drivers/arm/tzc/tzc_common_private.h
index efac85071..c800536f3 100644
--- a/drivers/arm/tzc/tzc_common_private.h
+++ b/drivers/arm/tzc/tzc_common_private.h
@@ -9,8 +9,8 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <mmio.h>
-#include <tzc_common.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/mmio.h>
#define DEFINE_TZC_COMMON_WRITE_ACTION(fn_name, macro_name) \
static inline void _tzc##fn_name##_write_action( \
diff --git a/drivers/arm/tzc/tzc_dmc500.c b/drivers/arm/tzc/tzc_dmc500.c
index f0aba9c19..e45fbf8d8 100644
--- a/drivers/arm/tzc/tzc_dmc500.c
+++ b/drivers/arm/tzc/tzc_dmc500.c
@@ -5,10 +5,12 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <mmio.h>
-#include <tzc_dmc500.h>
-#include "tzc_common.h"
+
+#include <common/debug.h>
+#include <drivers/arm/tzc_dmc500.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/mmio.h>
+
#include "tzc_common_private.h"
/*
diff --git a/drivers/arm/tzc/tzc_dmc620.c b/drivers/arm/tzc/tzc_dmc620.c
index 4abd0800b..64ec5abee 100644
--- a/drivers/arm/tzc/tzc_dmc620.c
+++ b/drivers/arm/tzc/tzc_dmc620.c
@@ -5,9 +5,10 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <mmio.h>
-#include <tzc_dmc620.h>
+
+#include <common/debug.h>
+#include <drivers/arm/tzc_dmc620.h>
+#include <lib/mmio.h>
/* Mask to extract bit 31 to 16 */
#define MASK_31_16 UINT64_C(0x0000ffff0000)
diff --git a/drivers/auth/auth_mod.c b/drivers/auth/auth_mod.c
index eb537b66a..1b8ff82bc 100644
--- a/drivers/auth/auth_mod.c
+++ b/drivers/auth/auth_mod.c
@@ -5,17 +5,19 @@
*/
#include <assert.h>
-#include <auth_common.h>
-#include <auth_mod.h>
-#include <cot_def.h>
-#include <crypto_mod.h>
-#include <debug.h>
-#include <img_parser_mod.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <common/tbbr/cot_def.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/auth_mod.h>
+#include <drivers/auth/crypto_mod.h>
+#include <drivers/auth/img_parser_mod.h>
+#include <plat/common/platform.h>
+
/* ASN.1 tags */
#define ASN1_INTEGER 0x02
diff --git a/drivers/auth/crypto_mod.c b/drivers/auth/crypto_mod.c
index 4cd05506b..5e5ac2b03 100644
--- a/drivers/auth/crypto_mod.c
+++ b/drivers/auth/crypto_mod.c
@@ -5,8 +5,9 @@
*/
#include <assert.h>
-#include <crypto_mod.h>
-#include <debug.h>
+
+#include <common/debug.h>
+#include <drivers/auth/crypto_mod.h>
/* Variable exported by the crypto library through REGISTER_CRYPTO_LIB() */
diff --git a/drivers/auth/cryptocell/cryptocell_crypto.c b/drivers/auth/cryptocell/cryptocell_crypto.c
index 80c10933e..a507d0a42 100644
--- a/drivers/auth/cryptocell/cryptocell_crypto.c
+++ b/drivers/auth/cryptocell/cryptocell_crypto.c
@@ -4,20 +4,22 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
-#include <crypto_driver.h>
-#include <crypto_mod.h>
-#include <debug.h>
-#include <mbedtls_common.h>
-#include <platform_def.h>
-#include <rsa.h>
-#include <sbrom_bsv_api.h>
-#include <secureboot_base_func.h>
-#include <secureboot_gen_defs.h>
#include <stddef.h>
#include <string.h>
-#include <util.h>
-#include <utils.h>
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/arm/cryptocell/crypto_driver.h>
+#include <drivers/arm/cryptocell/rsa.h>
+#include <drivers/arm/cryptocell/sbrom_bsv_api.h>
+#include <drivers/arm/cryptocell/secureboot_base_func.h>
+#include <drivers/arm/cryptocell/secureboot_gen_defs.h>
+#include <drivers/arm/cryptocell/util.h>
+#include <drivers/auth/crypto_mod.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <lib/utils.h>
#include <mbedtls/oid.h>
diff --git a/drivers/auth/cryptocell/cryptocell_crypto.mk b/drivers/auth/cryptocell/cryptocell_crypto.mk
index a88dcfc57..a631829fd 100644
--- a/drivers/auth/cryptocell/cryptocell_crypto.mk
+++ b/drivers/auth/cryptocell/cryptocell_crypto.mk
@@ -20,9 +20,7 @@ endif
TF_LDFLAGS += -L$(CCSBROM_LIB_PATH)
LDLIBS += -lcc_712sbromx509
-INCLUDES += -Iinclude/drivers/arm/cryptocell
-
CRYPTOCELL_SOURCES := drivers/auth/cryptocell/cryptocell_crypto.c
BL1_SOURCES += ${CRYPTOCELL_SOURCES}
-BL2_SOURCES += ${CRYPTOCELL_SOURCES} \ No newline at end of file
+BL2_SOURCES += ${CRYPTOCELL_SOURCES}
diff --git a/drivers/auth/img_parser_mod.c b/drivers/auth/img_parser_mod.c
index 63160141d..c4688f867 100644
--- a/drivers/auth/img_parser_mod.c
+++ b/drivers/auth/img_parser_mod.c
@@ -5,14 +5,15 @@
*/
#include <assert.h>
-#include <auth_common.h>
-#include <debug.h>
#include <errno.h>
-#include <img_parser_mod.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
-#include <utils_def.h>
+
+#include <common/debug.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/img_parser_mod.h>
+#include <lib/utils_def.h>
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START);
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END);
diff --git a/drivers/auth/mbedtls/mbedtls_common.c b/drivers/auth/mbedtls/mbedtls_common.c
index dbf45baeb..b6d02fd10 100644
--- a/drivers/auth/mbedtls/mbedtls_common.c
+++ b/drivers/auth/mbedtls/mbedtls_common.c
@@ -5,14 +5,16 @@
*/
#include <assert.h>
-#include <debug.h>
+#include <stddef.h>
+
/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>
-#include <mbedtls_common.h>
-#include <mbedtls_config.h>
-#include <platform.h>
-#include <stddef.h>
+
+#include <common/debug.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <drivers/auth/mbedtls/mbedtls_config.h>
+#include <plat/common/platform.h>
static void cleanup(void)
{
diff --git a/drivers/auth/mbedtls/mbedtls_common.mk b/drivers/auth/mbedtls/mbedtls_common.mk
index cfbd86ab9..63e65bd47 100644
--- a/drivers/auth/mbedtls/mbedtls_common.mk
+++ b/drivers/auth/mbedtls/mbedtls_common.mk
@@ -14,10 +14,9 @@ ifeq (${MBEDTLS_DIR},)
endif
MBEDTLS_INC = -I${MBEDTLS_DIR}/include
-INCLUDES += -Iinclude/drivers/auth/mbedtls
# Specify mbed TLS configuration file
-MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>"
+MBEDTLS_CONFIG_FILE := "<drivers/auth/mbedtls/mbedtls_config.h>"
$(eval $(call add_define,MBEDTLS_CONFIG_FILE))
MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c
diff --git a/drivers/auth/mbedtls/mbedtls_crypto.c b/drivers/auth/mbedtls/mbedtls_crypto.c
index bc9ed3a85..33420fbbd 100644
--- a/drivers/auth/mbedtls/mbedtls_crypto.c
+++ b/drivers/auth/mbedtls/mbedtls_crypto.c
@@ -4,10 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <crypto_mod.h>
-#include <debug.h>
-#include <mbedtls_common.h>
-#include <mbedtls_config.h>
#include <stddef.h>
#include <string.h>
@@ -17,6 +13,11 @@
#include <mbedtls/oid.h>
#include <mbedtls/platform.h>
+#include <common/debug.h>
+#include <drivers/auth/crypto_mod.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <drivers/auth/mbedtls/mbedtls_config.h>
+
#define LIB_NAME "mbed TLS"
/*
diff --git a/drivers/auth/mbedtls/mbedtls_x509_parser.c b/drivers/auth/mbedtls/mbedtls_x509_parser.c
index bda1208af..129566bd6 100644
--- a/drivers/auth/mbedtls/mbedtls_x509_parser.c
+++ b/drivers/auth/mbedtls/mbedtls_x509_parser.c
@@ -12,20 +12,21 @@
* extensions field, such as an image hash or a public key.
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <img_parser_mod.h>
-#include <mbedtls_common.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
-#include <utils.h>
/* mbed TLS headers */
#include <mbedtls/asn1.h>
#include <mbedtls/oid.h>
#include <mbedtls/platform.h>
+#include <arch_helpers.h>
+#include <drivers/auth/img_parser_mod.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <lib/utils.h>
+
/* Maximum OID string length ("a.b.c.d.e.f ...") */
#define MAX_OID_STR_LEN 64
diff --git a/drivers/auth/tbbr/tbbr_cot.c b/drivers/auth/tbbr/tbbr_cot.c
index a950a7a8d..ec14a185d 100644
--- a/drivers/auth/tbbr/tbbr_cot.c
+++ b/drivers/auth/tbbr/tbbr_cot.c
@@ -4,12 +4,13 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <auth_mod.h>
-#include <platform_def.h>
#include <stddef.h>
+#include <platform_def.h>
+
+#include <drivers/auth/auth_mod.h>
#if USE_TBBR_DEFS
-#include <tbbr_oid.h>
+#include <tools_share/tbbr_oid.h>
#else
#include <platform_oid.h>
#endif
diff --git a/drivers/cadence/uart/aarch64/cdns_console.S b/drivers/cadence/uart/aarch64/cdns_console.S
index 418810e15..43d08f454 100644
--- a/drivers/cadence/uart/aarch64/cdns_console.S
+++ b/drivers/cadence/uart/aarch64/cdns_console.S
@@ -6,9 +6,9 @@
#include <arch.h>
#include <asm_macros.S>
#include <assert_macros.S>
-#include <cadence/cdns_uart.h>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
+#include <drivers/cadence/cdns_uart.h>
/*
* "core" functions are low-level implementations that don't require
diff --git a/drivers/cfi/v2m/v2m_flash.c b/drivers/cfi/v2m/v2m_flash.c
index 9b80e2f2a..aadafbce2 100644
--- a/drivers/cfi/v2m/v2m_flash.c
+++ b/drivers/cfi/v2m/v2m_flash.c
@@ -5,8 +5,9 @@
*/
#include <errno.h>
-#include <mmio.h>
-#include <v2m_flash.h>
+
+#include <drivers/cfi/v2m_flash.h>
+#include <lib/mmio.h>
/*
* This file supplies a low level interface to the vexpress NOR flash
diff --git a/drivers/console/multi_console.c b/drivers/console/multi_console.c
index c678de098..e94de35c7 100644
--- a/drivers/console/multi_console.c
+++ b/drivers/console/multi_console.c
@@ -7,6 +7,7 @@
#if MULTI_CONSOLE_API
#include <assert.h>
+
#include <drivers/console.h>
console_t *console_list;
diff --git a/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S b/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S
index 89be349c0..4c14b69c5 100644
--- a/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S
+++ b/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S
@@ -5,9 +5,9 @@
*/
#include <asm_macros.S>
-#include <cbmem_console.h>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
+#include <drivers/coreboot/cbmem_console.h>
/*
* This driver implements access to coreboot's in-memory console
diff --git a/drivers/delay_timer/delay_timer.c b/drivers/delay_timer/delay_timer.c
index feac3579f..8c2996ec3 100644
--- a/drivers/delay_timer/delay_timer.c
+++ b/drivers/delay_timer/delay_timer.c
@@ -5,9 +5,11 @@
*/
#include <assert.h>
-#include <delay_timer.h>
+
#include <platform_def.h>
-#include <utils_def.h>
+
+#include <drivers/delay_timer.h>
+#include <lib/utils_def.h>
/***********************************************************
* The delay timer implementation
diff --git a/drivers/delay_timer/generic_delay_timer.c b/drivers/delay_timer/generic_delay_timer.c
index 03ca5321a..4b67ed0d1 100644
--- a/drivers/delay_timer/generic_delay_timer.c
+++ b/drivers/delay_timer/generic_delay_timer.c
@@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <generic_delay_timer.h>
-#include <platform.h>
+
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/generic_delay_timer.h>
+#include <plat/common/platform.h>
/* Ticks elapsed in one second by a signal of 1 MHz */
#define MHZ_TICKS_PER_SEC 1000000
diff --git a/drivers/gpio/gpio.c b/drivers/gpio/gpio.c
index 62f3dc253..76612b253 100644
--- a/drivers/gpio/gpio.c
+++ b/drivers/gpio/gpio.c
@@ -11,7 +11,8 @@
#include <assert.h>
#include <errno.h>
-#include <gpio.h>
+
+#include <drivers/gpio.h>
/*
* The gpio implementation
diff --git a/drivers/imx/timer/imx_gpt.c b/drivers/imx/timer/imx_gpt.c
index bd364eb30..464efe93f 100644
--- a/drivers/imx/timer/imx_gpt.c
+++ b/drivers/imx/timer/imx_gpt.c
@@ -5,8 +5,10 @@
*/
#include <assert.h>
-#include <delay_timer.h>
-#include <mmio.h>
+
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
#include <imx_gpt.h>
#define GPTCR_SWR BIT(15) /* Software reset */
diff --git a/drivers/imx/uart/imx_uart.c b/drivers/imx/uart/imx_uart.c
index 0250a4142..68d31c887 100644
--- a/drivers/imx/uart/imx_uart.c
+++ b/drivers/imx/uart/imx_uart.c
@@ -3,10 +3,14 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
+
#include <stdint.h>
-#include <mmio.h>
+
#include <platform_def.h>
+
+#include <arch.h>
+#include <lib/mmio.h>
+
#include <imx_uart.h>
/* TX/RX FIFO threshold */
diff --git a/drivers/imx/usdhc/imx_usdhc.c b/drivers/imx/usdhc/imx_usdhc.c
index 1f9550e17..07f55b784 100644
--- a/drivers/imx/usdhc/imx_usdhc.c
+++ b/drivers/imx/usdhc/imx_usdhc.c
@@ -4,17 +4,19 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <imx_usdhc.h>
-#include <mmc.h>
#include <errno.h>
-#include <mmio.h>
#include <string.h>
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/mmc.h>
+#include <lib/mmio.h>
+
+#include <imx_usdhc.h>
+
static void imx_usdhc_initialize(void);
static int imx_usdhc_send_cmd(struct mmc_cmd *cmd);
static int imx_usdhc_set_ios(unsigned int clk, unsigned int width);
diff --git a/drivers/imx/usdhc/imx_usdhc.h b/drivers/imx/usdhc/imx_usdhc.h
index 9ff3298df..e063316ae 100644
--- a/drivers/imx/usdhc/imx_usdhc.h
+++ b/drivers/imx/usdhc/imx_usdhc.h
@@ -7,7 +7,7 @@
#ifndef IMX_USDHC_H
#define IMX_USDHC_H
-#include <mmc.h>
+#include <drivers/mmc.h>
typedef struct imx_usdhc_params {
uintptr_t reg_base;
diff --git a/drivers/io/io_block.c b/drivers/io/io_block.c
index ff13113af..f190a4307 100644
--- a/drivers/io/io_block.c
+++ b/drivers/io/io_block.c
@@ -5,14 +5,16 @@
*/
#include <assert.h>
-#include <debug.h>
#include <errno.h>
-#include <io_block.h>
-#include <io_driver.h>
-#include <io_storage.h>
-#include <platform_def.h>
#include <string.h>
-#include <utils.h>
+
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <drivers/io/io_block.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+#include <lib/utils.h>
typedef struct {
io_block_dev_spec_t *dev_spec;
diff --git a/drivers/io/io_dummy.c b/drivers/io/io_dummy.c
index d4020e3a6..4f0cda6da 100644
--- a/drivers/io/io_dummy.c
+++ b/drivers/io/io_dummy.c
@@ -5,12 +5,13 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <io_driver.h>
-#include <io_dummy.h>
-#include <io_storage.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_dummy.h>
+#include <drivers/io/io_storage.h>
+
struct file_state {
int in_use;
size_t size;
diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c
index 9d6c763e8..d4771b514 100644
--- a/drivers/io/io_fip.c
+++ b/drivers/io/io_fip.c
@@ -5,19 +5,21 @@
*/
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
#include <errno.h>
-#include <firmware_image_package.h>
-#include <io_driver.h>
-#include <io_fip.h>
-#include <io_storage.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
-#include <utils.h>
-#include <uuid.h>
+
+#include <platform_def.h>
+
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_fip.h>
+#include <drivers/io/io_storage.h>
+#include <lib/utils.h>
+#include <plat/common/platform.h>
+#include <tools_share/firmware_image_package.h>
+#include <tools_share/uuid.h>
#ifndef MAX_FIP_DEVICES
#define MAX_FIP_DEVICES 1
diff --git a/drivers/io/io_memmap.c b/drivers/io/io_memmap.c
index 5595e60a4..96590b6c0 100644
--- a/drivers/io/io_memmap.c
+++ b/drivers/io/io_memmap.c
@@ -5,13 +5,15 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <io_driver.h>
-#include <io_memmap.h>
-#include <io_storage.h>
-#include <platform_def.h>
#include <string.h>
-#include <utils.h>
+
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_memmap.h>
+#include <drivers/io/io_storage.h>
+#include <lib/utils.h>
/* As we need to be able to keep state for seek, only one file can be open
* at a time. Make this a structure and point to the entity->info. When we
diff --git a/drivers/io/io_semihosting.c b/drivers/io/io_semihosting.c
index 9ca0a9dc9..23d09c118 100644
--- a/drivers/io/io_semihosting.c
+++ b/drivers/io/io_semihosting.c
@@ -5,13 +5,13 @@
*/
#include <assert.h>
-#include <io_driver.h>
-#include <io_semihosting.h>
-#include <io_storage.h>
-#include <platform_def.h>
-#include <semihosting.h>
+#include <platform_def.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_semihosting.h>
+#include <drivers/io/io_storage.h>
+#include <lib/semihosting.h>
/* Identify the device type as semihosting */
static io_type_t device_type_sh(void)
diff --git a/drivers/io/io_storage.c b/drivers/io/io_storage.c
index 948f84813..c9ff31bcc 100644
--- a/drivers/io/io_storage.c
+++ b/drivers/io/io_storage.c
@@ -5,11 +5,12 @@
*/
#include <assert.h>
-#include <io_driver.h>
-#include <io_storage.h>
-#include <platform_def.h>
#include <stddef.h>
+#include <platform_def.h>
+
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
/* Storage for a fixed maximum number of IO entities, definable by platform */
static io_entity_t entity_pool[MAX_IO_HANDLES];
diff --git a/drivers/marvell/amb_adec.c b/drivers/marvell/amb_adec.c
index 16fe772da..1f671058d 100644
--- a/drivers/marvell/amb_adec.c
+++ b/drivers/marvell/amb_adec.c
@@ -7,9 +7,10 @@
/* AXI to M-Bridge decoding unit driver for Marvell Armada 8K and 8K+ SoCs */
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <debug.h>
-#include <mmio.h>
#include <mvebu.h>
#include <mvebu_def.h>
diff --git a/drivers/marvell/ap807_clocks_init.c b/drivers/marvell/ap807_clocks_init.c
index 841e6aeb4..04c256b61 100644
--- a/drivers/marvell/ap807_clocks_init.c
+++ b/drivers/marvell/ap807_clocks_init.c
@@ -5,10 +5,11 @@
* https://spdx.org/licenses
*/
+#include <drivers/delay_timer.h>
+#include <drivers/marvell/aro.h>
+#include <lib/mmio.h>
+
#include <a8k_plat_def.h>
-#include <aro.h>
-#include <delay_timer.h>
-#include <mmio.h>
/* Notify bootloader on DRAM setup */
#define AP807_CPU_ARO_CTRL(cluster) \
diff --git a/drivers/marvell/cache_llc.c b/drivers/marvell/cache_llc.c
index e13e6ce2f..3df93a43b 100644
--- a/drivers/marvell/cache_llc.c
+++ b/drivers/marvell/cache_llc.c
@@ -9,11 +9,13 @@
* for Marvell SoCs in AP806, AP807, and AP810
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <cache_llc.h>
-#include <ccu.h>
-#include <mmio.h>
+
+#include <arch_helpers.h>
+#include <drivers/marvell/cache_llc.h>
+#include <drivers/marvell/ccu.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
#define CCU_HTC_CR(ap_index) (MVEBU_CCU_BASE(ap_index) + 0x200)
diff --git a/drivers/marvell/ccu.c b/drivers/marvell/ccu.c
index acb1c00c0..1e4ab44da 100644
--- a/drivers/marvell/ccu.c
+++ b/drivers/marvell/ccu.c
@@ -7,10 +7,11 @@
/* CCU unit device driver for Marvell AP807, AP807 and AP810 SoCs */
+#include <common/debug.h>
+#include <drivers/marvell/ccu.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <ccu.h>
-#include <debug.h>
-#include <mmio.h>
#include <mvebu.h>
#include <mvebu_def.h>
diff --git a/drivers/marvell/comphy/phy-comphy-3700.c b/drivers/marvell/comphy/phy-comphy-3700.c
index 53a59b0f5..2e8c4128e 100644
--- a/drivers/marvell/comphy/phy-comphy-3700.c
+++ b/drivers/marvell/comphy/phy-comphy-3700.c
@@ -5,13 +5,16 @@
* https://spdx.org/licenses
*/
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+#include <lib/spinlock.h>
+
#include <mvebu.h>
#include <mvebu_def.h>
-#include <spinlock.h>
+
#include "phy-comphy-3700.h"
#include "phy-comphy-common.h"
diff --git a/drivers/marvell/comphy/phy-comphy-cp110.c b/drivers/marvell/comphy/phy-comphy-cp110.c
index 86e5f1c68..384dd39f2 100644
--- a/drivers/marvell/comphy/phy-comphy-cp110.c
+++ b/drivers/marvell/comphy/phy-comphy-cp110.c
@@ -7,12 +7,14 @@
/* Marvell CP110 SoC COMPHY unit driver */
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+#include <lib/spinlock.h>
+
#include <mvebu_def.h>
-#include <spinlock.h>
#include "mvebu.h"
#include "comphy-cp110.h"
#include "phy-comphy-cp110.h"
diff --git a/drivers/marvell/gwin.c b/drivers/marvell/gwin.c
index a4743eb5e..9d9430836 100644
--- a/drivers/marvell/gwin.c
+++ b/drivers/marvell/gwin.c
@@ -7,10 +7,11 @@
/* GWIN unit device driver for Marvell AP810 SoC */
+#include <common/debug.h>
+#include <drivers/marvell/gwin.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <debug.h>
-#include <gwin.h>
-#include <mmio.h>
#include <mvebu.h>
#include <mvebu_def.h>
diff --git a/drivers/marvell/io_win.c b/drivers/marvell/io_win.c
index c0424e086..c4257fa7c 100644
--- a/drivers/marvell/io_win.c
+++ b/drivers/marvell/io_win.c
@@ -7,10 +7,11 @@
/* IO Window unit device driver for Marvell AP807, AP807 and AP810 SoCs */
+#include <common/debug.h>
+#include <drivers/marvell/io_win.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <debug.h>
-#include <io_win.h>
-#include <mmio.h>
#include <mvebu.h>
#include <mvebu_def.h>
diff --git a/drivers/marvell/iob.c b/drivers/marvell/iob.c
index e88bc1673..87f147aa4 100644
--- a/drivers/marvell/iob.c
+++ b/drivers/marvell/iob.c
@@ -7,11 +7,12 @@
/* IOW unit device driver for Marvell CP110 and CP115 SoCs */
-#include <armada_common.h>
#include <arch_helpers.h>
-#include <debug.h>
-#include <iob.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/marvell/iob.h>
+#include <lib/mmio.h>
+
+#include <armada_common.h>
#include <mvebu.h>
#include <mvebu_def.h>
diff --git a/drivers/marvell/mc_trustzone/mc_trustzone.c b/drivers/marvell/mc_trustzone/mc_trustzone.c
index 0db3b8d09..52b300676 100644
--- a/drivers/marvell/mc_trustzone/mc_trustzone.c
+++ b/drivers/marvell/mc_trustzone/mc_trustzone.c
@@ -5,10 +5,12 @@
* https://spdx.org/licenses
*/
-#include <addr_map.h>
-#include <debug.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/marvell/addr_map.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
+
#include "mc_trustzone.h"
#define TZ_SIZE(x) ((x) >> 13)
diff --git a/drivers/marvell/mc_trustzone/mc_trustzone.h b/drivers/marvell/mc_trustzone/mc_trustzone.h
index d36dcb5c0..296dce853 100644
--- a/drivers/marvell/mc_trustzone/mc_trustzone.h
+++ b/drivers/marvell/mc_trustzone/mc_trustzone.h
@@ -8,7 +8,7 @@
#ifndef MC_TRUSTZONE_H
#define MC_TRUSTZONE_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
#define MVEBU_TZ_MAX_WINS 16
diff --git a/drivers/marvell/mci.c b/drivers/marvell/mci.c
index 721504e03..3a9859c98 100644
--- a/drivers/marvell/mci.c
+++ b/drivers/marvell/mci.c
@@ -7,10 +7,11 @@
/* MCI bus driver for Marvell ARMADA 8K and 8K+ SoCs */
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
-#include <mci.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/marvell/mci.h>
+#include <lib/mmio.h>
+
#include <mvebu.h>
#include <mvebu_def.h>
#include <plat_marvell.h>
diff --git a/drivers/marvell/mochi/ap807_setup.c b/drivers/marvell/mochi/ap807_setup.c
index 075ca31f8..864c9230a 100644
--- a/drivers/marvell/mochi/ap807_setup.c
+++ b/drivers/marvell/mochi/ap807_setup.c
@@ -7,13 +7,14 @@
/* AP807 Marvell SoC driver */
-#include <ap_setup.h>
-#include <cache_llc.h>
-#include <ccu.h>
-#include <debug.h>
-#include <io_win.h>
-#include <mci.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/marvell/cache_llc.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/io_win.h>
+#include <drivers/marvell/mci.h>
+#include <drivers/marvell/mochi/ap_setup.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
#define SMMU_sACR (MVEBU_SMMU_BASE + 0x10)
diff --git a/drivers/marvell/mochi/apn806_setup.c b/drivers/marvell/mochi/apn806_setup.c
index 1d33be93a..1e91c4317 100644
--- a/drivers/marvell/mochi/apn806_setup.c
+++ b/drivers/marvell/mochi/apn806_setup.c
@@ -7,13 +7,14 @@
/* AP806 Marvell SoC driver */
-#include <ap_setup.h>
-#include <ccu.h>
-#include <cache_llc.h>
-#include <debug.h>
-#include <io_win.h>
-#include <mci.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/cache_llc.h>
+#include <drivers/marvell/io_win.h>
+#include <drivers/marvell/mci.h>
+#include <drivers/marvell/mochi/ap_setup.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
#define SMMU_sACR (MVEBU_SMMU_BASE + 0x10)
diff --git a/drivers/marvell/mochi/cp110_setup.c b/drivers/marvell/mochi/cp110_setup.c
index 654bb62b2..d7d737318 100644
--- a/drivers/marvell/mochi/cp110_setup.c
+++ b/drivers/marvell/mochi/cp110_setup.c
@@ -7,11 +7,12 @@
/* CP110 Marvell SoC driver */
-#include <amb_adec.h>
-#include <cp110_setup.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <iob.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/marvell/amb_adec.h>
+#include <drivers/marvell/iob.h>
+#include <drivers/marvell/mochi/cp110_setup.h>
+
#include <plat_marvell.h>
/*
diff --git a/drivers/marvell/thermal.c b/drivers/marvell/thermal.c
index c7ceb9291..a501ab44e 100644
--- a/drivers/marvell/thermal.c
+++ b/drivers/marvell/thermal.c
@@ -7,8 +7,8 @@
/* Driver for thermal unit located in Marvell ARMADA 8K and compatible SoCs */
-#include <debug.h>
-#include <thermal.h>
+#include <common/debug.h>
+#include <drivers/marvell/thermal.h>
int marvell_thermal_init(struct tsen_config *tsen_cfg)
{
diff --git a/drivers/marvell/uart/a3700_console.S b/drivers/marvell/uart/a3700_console.S
index 25c21cfcd..cc3855dbb 100644
--- a/drivers/marvell/uart/a3700_console.S
+++ b/drivers/marvell/uart/a3700_console.S
@@ -7,9 +7,9 @@
#include <arch.h>
#include <asm_macros.S>
-#include <a3700_console.h>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
+#include <drivers/marvell/uart/a3700_console.h>
/*
* "core" functions are low-level implementations that don't require
diff --git a/drivers/mentor/i2c/mi2cv.c b/drivers/mentor/i2c/mi2cv.c
index 8ebd9662b..1cdcf7478 100644
--- a/drivers/mentor/i2c/mi2cv.c
+++ b/drivers/mentor/i2c/mi2cv.c
@@ -11,12 +11,14 @@
* for Marvell and Allwinner SoCs in ATF.
*/
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <mentor/mi2cv.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/mentor/mi2cv.h>
+#include <lib/mmio.h>
+
#include <mentor_i2c_plat.h>
-#include <mmio.h>
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
#define DEBUG_I2C
diff --git a/drivers/meson/console/aarch64/meson_console.S b/drivers/meson/console/aarch64/meson_console.S
index eaee10ef1..5cf9b8878 100644
--- a/drivers/meson/console/aarch64/meson_console.S
+++ b/drivers/meson/console/aarch64/meson_console.S
@@ -8,7 +8,7 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
-#include <meson_console.h>
+#include <drivers/meson/meson_console.h>
.globl console_meson_register
.globl console_meson_init
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 4160003c8..50e87c1db 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -6,15 +6,16 @@
/* Define a simple and generic interface to access eMMC and SD-card devices. */
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <mmc.h>
#include <stdbool.h>
#include <string.h>
-#include <utils.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/mmc.h>
+#include <lib/utils.h>
#define MMC_DEFAULT_MAX_RETRIES 5
#define SEND_OP_COND_MAX_RETRIES 100
diff --git a/drivers/partition/gpt.c b/drivers/partition/gpt.c
index 0c51e62a8..4577f06a2 100644
--- a/drivers/partition/gpt.c
+++ b/drivers/partition/gpt.c
@@ -5,11 +5,12 @@
*/
#include <assert.h>
-#include <debug.h>
#include <errno.h>
-#include <gpt.h>
#include <string.h>
-#include <utils.h>
+
+#include <common/debug.h>
+#include <drivers/partition/gpt.h>
+#include <lib/utils.h>
static int unicode_to_ascii(unsigned short *str_in, unsigned char *str_out)
{
diff --git a/drivers/partition/partition.c b/drivers/partition/partition.c
index 6085b8651..07869acf5 100644
--- a/drivers/partition/partition.c
+++ b/drivers/partition/partition.c
@@ -5,15 +5,16 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <gpt.h>
-#include <io_storage.h>
-#include <mbr.h>
-#include <partition.h>
-#include <platform.h>
#include <stdio.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_storage.h>
+#include <drivers/partition/partition.h>
+#include <drivers/partition/gpt.h>
+#include <drivers/partition/mbr.h>
+#include <plat/common/platform.h>
+
static uint8_t mbr_sector[PARTITION_BLOCK_SIZE];
partition_entry_list_t list;
diff --git a/drivers/renesas/rcar/auth/auth_mod.c b/drivers/renesas/rcar/auth/auth_mod.c
index 04ed27928..d9446d95e 100644
--- a/drivers/renesas/rcar/auth/auth_mod.c
+++ b/drivers/renesas/rcar/auth/auth_mod.c
@@ -5,13 +5,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
-#include <debug.h>
-#include <mmio.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stddef.h>
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
#include "rom_api.h"
typedef int32_t(*secure_boot_api_f) (uint32_t a, uint32_t b, void *c);
diff --git a/drivers/renesas/rcar/avs/avs_driver.c b/drivers/renesas/rcar/avs/avs_driver.c
index 80a7c9190..647869ede 100644
--- a/drivers/renesas/rcar/avs/avs_driver.c
+++ b/drivers/renesas/rcar/avs/avs_driver.c
@@ -4,9 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
-#include <debug.h>
-#include <utils_def.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <lib/utils_def.h>
+
#include "cpg_registers.h"
#include "avs_driver.h"
#include "rcar_def.h"
diff --git a/drivers/renesas/rcar/board/board.c b/drivers/renesas/rcar/board/board.c
index 147a0b0c3..f15e06bc0 100644
--- a/drivers/renesas/rcar/board/board.c
+++ b/drivers/renesas/rcar/board/board.c
@@ -6,9 +6,12 @@
*/
#include <stdint.h>
+
+#include <lib/utils_def.h>
+
#include <iic_dvfs.h>
+
#include "board.h"
-#include "utils_def.h"
#ifndef BOARD_DEFAULT
#if (RCAR_LSI == RCAR_E3)
diff --git a/drivers/renesas/rcar/common.c b/drivers/renesas/rcar/common.c
index e82e8b521..42bdce579 100644
--- a/drivers/renesas/rcar/common.c
+++ b/drivers/renesas/rcar/common.c
@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
+#include <lib/mmio.h>
+
#include "rcar_private.h"
void
diff --git a/drivers/renesas/rcar/console/rcar_printf.c b/drivers/renesas/rcar/console/rcar_printf.c
index 9321b584a..2a6e2c003 100644
--- a/drivers/renesas/rcar/console/rcar_printf.c
+++ b/drivers/renesas/rcar/console/rcar_printf.c
@@ -4,16 +4,18 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
#include <stdarg.h>
#include <stdint.h>
-#include <arch_helpers.h>
-#include <platform_def.h>
-#include <bakery_lock.h>
-#include "rcar_def.h"
-#include "rcar_private.h"
-#include "rcar_printf.h"
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/bakery_lock.h>
+
+#include "rcar_def.h"
+#include "rcar_private.h"
+#include "rcar_printf.h"
#define INDEX_TIMER_COUNT (4U)
diff --git a/drivers/renesas/rcar/cpld/ulcb_cpld.c b/drivers/renesas/rcar/cpld/ulcb_cpld.c
index 92e438a4f..d7192f48d 100644
--- a/drivers/renesas/rcar/cpld/ulcb_cpld.c
+++ b/drivers/renesas/rcar/cpld/ulcb_cpld.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
+#include <lib/mmio.h>
#define SCLK 8 /* GP_6_8 */
#define SSTBZ 3 /* GP_2_3 */
diff --git a/drivers/renesas/rcar/delay/micro_delay.h b/drivers/renesas/rcar/delay/micro_delay.h
index 458959fd8..4e4b28bab 100644
--- a/drivers/renesas/rcar/delay/micro_delay.h
+++ b/drivers/renesas/rcar/delay/micro_delay.h
@@ -10,7 +10,7 @@
#define TMU3_MEASUREMENT (0)
#ifndef __ASSEMBLY__
-#include "stdint.h"
+#include <stdint.h>
void rcar_micro_delay(uint32_t count_us);
#if (TMU3_MEASUREMENT == 1)
diff --git a/drivers/renesas/rcar/dma/dma_driver.c b/drivers/renesas/rcar/dma/dma_driver.c
index d4fa65d26..fef55c477 100644
--- a/drivers/renesas/rcar/dma/dma_driver.c
+++ b/drivers/renesas/rcar/dma/dma_driver.c
@@ -5,12 +5,14 @@
*/
#include <stdint.h>
-#include <arch_helpers.h>
#include <string.h>
-#include <mmio.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#include "cpg_registers.h"
-#include "debug.h"
#include "rcar_private.h"
/* DMA CHANNEL setting (0/16/32) */
diff --git a/drivers/renesas/rcar/emmc/emmc_cmd.c b/drivers/renesas/rcar/emmc/emmc_cmd.c
index 0f393490c..a2e25e339 100644
--- a/drivers/renesas/rcar/emmc/emmc_cmd.c
+++ b/drivers/renesas/rcar/emmc/emmc_cmd.c
@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
+#include <common/debug.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_init.c b/drivers/renesas/rcar/emmc/emmc_init.c
index 386fb1e4e..b27e16586 100644
--- a/drivers/renesas/rcar/emmc/emmc_init.c
+++ b/drivers/renesas/rcar/emmc/emmc_init.c
@@ -5,7 +5,9 @@
*/
#include <stddef.h>
-#include <mmio.h>
+
+#include <lib/mmio.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_interrupt.c b/drivers/renesas/rcar/emmc/emmc_interrupt.c
index 3077db4c0..37a3cf9d4 100644
--- a/drivers/renesas/rcar/emmc/emmc_interrupt.c
+++ b/drivers/renesas/rcar/emmc/emmc_interrupt.c
@@ -5,6 +5,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <stddef.h>
+
+#include <lib/mmio.h>
#include "emmc_config.h"
#include "emmc_def.h"
@@ -13,9 +16,6 @@
#include "emmc_std.h"
#include "rcar_def.h"
-#include <mmio.h>
-#include <stddef.h>
-
static EMMC_ERROR_CODE emmc_trans_sector(uint32_t *buff_address_virtual);
uint32_t emmc_interrupt(void)
diff --git a/drivers/renesas/rcar/emmc/emmc_mount.c b/drivers/renesas/rcar/emmc/emmc_mount.c
index 9a7d2cad6..dd57b0c24 100644
--- a/drivers/renesas/rcar/emmc/emmc_mount.c
+++ b/drivers/renesas/rcar/emmc/emmc_mount.c
@@ -4,8 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_read.c b/drivers/renesas/rcar/emmc/emmc_read.c
index b11c2c43e..390d0caac 100644
--- a/drivers/renesas/rcar/emmc/emmc_read.c
+++ b/drivers/renesas/rcar/emmc/emmc_read.c
@@ -3,7 +3,9 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <arch_helpers.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/emmc/emmc_utility.c b/drivers/renesas/rcar/emmc/emmc_utility.c
index e64947ddc..39d9ede5a 100644
--- a/drivers/renesas/rcar/emmc/emmc_utility.c
+++ b/drivers/renesas/rcar/emmc/emmc_utility.c
@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
+#include <common/debug.h>
+
#include "emmc_config.h"
#include "emmc_hal.h"
#include "emmc_std.h"
diff --git a/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c b/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
index 11d52bf76..39b9bb4e3 100644
--- a/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
+++ b/drivers/renesas/rcar/iic_dvfs/iic_dvfs.c
@@ -4,8 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
-#include <debug.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#include "cpg_registers.h"
#include "iic_dvfs.h"
diff --git a/drivers/renesas/rcar/io/io_emmcdrv.c b/drivers/renesas/rcar/io/io_emmcdrv.c
index f74bd5f4e..4b464fb3e 100644
--- a/drivers/renesas/rcar/io/io_emmcdrv.c
+++ b/drivers/renesas/rcar/io/io_emmcdrv.c
@@ -4,11 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <io_driver.h>
-#include <io_storage.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+
#include "io_common.h"
#include "io_emmcdrv.h"
#include "io_private.h"
diff --git a/drivers/renesas/rcar/io/io_memdrv.c b/drivers/renesas/rcar/io/io_memdrv.c
index e55fd6466..3f6b4c71b 100644
--- a/drivers/renesas/rcar/io/io_memdrv.c
+++ b/drivers/renesas/rcar/io/io_memdrv.c
@@ -4,11 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <io_driver.h>
-#include <io_storage.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+
#include "io_common.h"
#include "io_private.h"
#include "io_memdrv.h"
diff --git a/drivers/renesas/rcar/io/io_rcar.c b/drivers/renesas/rcar/io/io_rcar.c
index 4293c51c5..650931bb4 100644
--- a/drivers/renesas/rcar/io/io_rcar.c
+++ b/drivers/renesas/rcar/io/io_rcar.c
@@ -4,23 +4,27 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <auth_mod.h>
-#include <bl_common.h>
-#include <debug.h>
#include <errno.h>
-#include <firmware_image_package.h>
-#include <io_driver.h>
-#include <io_storage.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
-#include <uuid.h>
-#include <mmio.h>
+
+#include <platform_def.h>
+
#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/auth/auth_mod.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+#include <tools_share/firmware_image_package.h>
+#include <tools_share/uuid.h>
+
#include "io_rcar.h"
#include "io_common.h"
#include "io_private.h"
+
extern int32_t plat_get_drv_source(uint32_t id, uintptr_t *dev,
uintptr_t *image_spec);
diff --git a/drivers/renesas/rcar/pwrc/pwrc.c b/drivers/renesas/rcar/pwrc/pwrc.c
index 6dfc0b69f..8cdfe75e5 100644
--- a/drivers/renesas/rcar/pwrc/pwrc.c
+++ b/drivers/renesas/rcar/pwrc/pwrc.c
@@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <bakery_lock.h>
-#include <debug.h>
-#include <mmio.h>
#include <string.h>
-#include <xlat_tables_v2.h>
+
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables_v2.h>
+
#include "iic_dvfs.h"
#include "rcar_def.h"
#include "rcar_private.h"
diff --git a/drivers/renesas/rcar/rom/rom_api.c b/drivers/renesas/rcar/rom/rom_api.c
index c14de55b6..be38fbff3 100644
--- a/drivers/renesas/rcar/rom/rom_api.c
+++ b/drivers/renesas/rcar/rom/rom_api.c
@@ -4,8 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
#include <stdint.h>
+
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#include "rom_api.h"
diff --git a/drivers/renesas/rcar/rpc/rpc_driver.c b/drivers/renesas/rcar/rpc/rpc_driver.c
index bc7424ac6..bea275210 100644
--- a/drivers/renesas/rcar/rpc/rpc_driver.c
+++ b/drivers/renesas/rcar/rpc/rpc_driver.c
@@ -4,12 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
#include <stdint.h>
#include <string.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "cpg_registers.h"
#include "rpc_registers.h"
-#include "debug.h"
#include "rcar_private.h"
#define MSTPSR9_RPC_BIT (0x00020000U)
diff --git a/drivers/renesas/rcar/watchdog/swdt.c b/drivers/renesas/rcar/watchdog/swdt.c
index f9dbf86fe..42f865349 100644
--- a/drivers/renesas/rcar/watchdog/swdt.c
+++ b/drivers/renesas/rcar/watchdog/swdt.c
@@ -5,9 +5,10 @@
*/
#include <arch_helpers.h>
-#include <debug.h>
-#include <gicv2.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/arm/gicv2.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
extern void gicd_set_icenabler(uintptr_t base, unsigned int id);
diff --git a/drivers/st/clk/stm32mp1_clk.c b/drivers/st/clk/stm32mp1_clk.c
index b8457cb37..7a8898672 100644
--- a/drivers/st/clk/stm32mp1_clk.c
+++ b/drivers/st/clk/stm32mp1_clk.c
@@ -4,26 +4,29 @@
* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <dt-bindings/clock/stm32mp1-clks.h>
-#include <dt-bindings/clock/stm32mp1-clksrc.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <libfdt.h>
-#include <mmio.h>
-#include <platform.h>
#include <stdint.h>
#include <stdio.h>
-#include <stm32mp1_clk.h>
-#include <stm32mp1_clkfunc.h>
+
+#include <libfdt.h>
+
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/generic_delay_timer.h>
+#include <drivers/st/stm32mp1_clk.h>
+#include <drivers/st/stm32mp1_clkfunc.h>
+#include <drivers/st/stm32mp1_rcc.h>
+#include <dt-bindings/clock/stm32mp1-clks.h>
+#include <dt-bindings/clock/stm32mp1-clksrc.h>
+#include <lib/mmio.h>
+#include <lib/utils_def.h>
+#include <plat/common/platform.h>
+
#include <stm32mp1_dt.h>
#include <stm32mp1_private.h>
-#include <stm32mp1_rcc.h>
-#include <utils_def.h>
#define MAX_HSI_HZ 64000000
diff --git a/drivers/st/clk/stm32mp1_clkfunc.c b/drivers/st/clk/stm32mp1_clkfunc.c
index 078d803e7..179191945 100644
--- a/drivers/st/clk/stm32mp1_clkfunc.c
+++ b/drivers/st/clk/stm32mp1_clkfunc.c
@@ -4,11 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <dt-bindings/clock/stm32mp1-clksrc.h>
#include <errno.h>
+
#include <libfdt.h>
-#include <stm32mp1_clk.h>
-#include <stm32mp1_clkfunc.h>
+
+#include <drivers/st/stm32mp1_clk.h>
+#include <drivers/st/stm32mp1_clkfunc.h>
+#include <dt-bindings/clock/stm32mp1-clksrc.h>
+
#include <stm32mp1_dt.h>
#define DT_RCC_NODE_NAME "rcc@50000000"
diff --git a/drivers/st/ddr/stm32mp1_ddr.c b/drivers/st/ddr/stm32mp1_ddr.c
index eed1d7613..a2b0e9ec0 100644
--- a/drivers/st/ddr/stm32mp1_ddr.c
+++ b/drivers/st/ddr/stm32mp1_ddr.c
@@ -4,22 +4,25 @@
* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
*/
+#include <stddef.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <debug.h>
-#include <delay_timer.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/st/stm32mp1_clk.h>
+#include <drivers/st/stm32mp1_ddr.h>
+#include <drivers/st/stm32mp1_ddr_regs.h>
+#include <drivers/st/stm32mp1_pmic.h>
+#include <drivers/st/stm32mp1_pwr.h>
+#include <drivers/st/stm32mp1_ram.h>
+#include <drivers/st/stm32mp1_rcc.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
-#include <mmio.h>
-#include <platform.h>
-#include <stddef.h>
-#include <stm32mp1_clk.h>
-#include <stm32mp1_ddr.h>
-#include <stm32mp1_ddr_regs.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include <stm32mp1_def.h>
#include <stm32mp1_dt.h>
-#include <stm32mp1_pmic.h>
-#include <stm32mp1_pwr.h>
-#include <stm32mp1_ram.h>
-#include <stm32mp1_rcc.h>
struct reg_desc {
const char *name;
diff --git a/drivers/st/ddr/stm32mp1_ddr_helpers.c b/drivers/st/ddr/stm32mp1_ddr_helpers.c
index 325c0b897..a8c1b7769 100644
--- a/drivers/st/ddr/stm32mp1_ddr_helpers.c
+++ b/drivers/st/ddr/stm32mp1_ddr_helpers.c
@@ -4,10 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
#include <platform_def.h>
-#include <stm32mp1_ddr_helpers.h>
-#include <stm32mp1_rcc.h>
+
+#include <drivers/st/stm32mp1_ddr_helpers.h>
+#include <drivers/st/stm32mp1_rcc.h>
+#include <lib/mmio.h>
void ddr_enable_clock(void)
{
diff --git a/drivers/st/ddr/stm32mp1_ram.c b/drivers/st/ddr/stm32mp1_ram.c
index 6d515ec76..1c8217917 100644
--- a/drivers/st/ddr/stm32mp1_ram.c
+++ b/drivers/st/ddr/stm32mp1_ram.c
@@ -4,21 +4,25 @@
* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
*/
-#include <arch_helpers.h>
-#include <boot_api.h>
-#include <debug.h>
-#include <dt-bindings/clock/stm32mp1-clks.h>
#include <errno.h>
+
#include <libfdt.h>
-#include <mmio.h>
+
#include <platform_def.h>
-#include <stm32mp1_clk.h>
-#include <stm32mp1_ddr.h>
-#include <stm32mp1_ddr_helpers.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/st/stm32mp1_clk.h>
+#include <drivers/st/stm32mp1_ddr.h>
+#include <drivers/st/stm32mp1_ddr_helpers.h>
+#include <drivers/st/stm32mp1_ram.h>
+#include <drivers/st/stm32mp1_rcc.h>
+#include <dt-bindings/clock/stm32mp1-clks.h>
+#include <lib/mmio.h>
+
+#include <boot_api.h>
#include <stm32mp1_dt.h>
#include <stm32mp1_private.h>
-#include <stm32mp1_ram.h>
-#include <stm32mp1_rcc.h>
#define DDR_PATTERN 0xAAAAAAAAU
#define DDR_ANTIPATTERN 0x55555555U
diff --git a/drivers/st/gpio/stm32_gpio.c b/drivers/st/gpio/stm32_gpio.c
index 200b47340..9591e3738 100644
--- a/drivers/st/gpio/stm32_gpio.c
+++ b/drivers/st/gpio/stm32_gpio.c
@@ -4,11 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bl_common.h>
-#include <debug.h>
-#include <mmio.h>
#include <stdbool.h>
-#include <stm32_gpio.h>
+
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/st/stm32_gpio.h>
+#include <lib/mmio.h>
static bool check_gpio(uint32_t bank, uint32_t pin)
{
diff --git a/drivers/st/io/io_mmc.c b/drivers/st/io/io_mmc.c
index 1ed262057..a239b5f3a 100644
--- a/drivers/st/io/io_mmc.c
+++ b/drivers/st/io/io_mmc.c
@@ -5,15 +5,16 @@
*/
#include <assert.h>
-#include <debug.h>
#include <errno.h>
-#include <io_driver.h>
-#include <io_mmc.h>
-#include <io_storage.h>
-#include <mmc.h>
-#include <stm32_sdmmc2.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+#include <drivers/mmc.h>
+#include <drivers/st/io_mmc.h>
+#include <drivers/st/stm32_sdmmc2.h>
+
/* SDMMC device functions */
static int mmc_dev_open(const uintptr_t init_params, io_dev_info_t **dev_info);
static int mmc_block_open(io_dev_info_t *dev_info, const uintptr_t spec,
diff --git a/drivers/st/io/io_stm32image.c b/drivers/st/io/io_stm32image.c
index e6798e047..ba612e2e9 100644
--- a/drivers/st/io/io_stm32image.c
+++ b/drivers/st/io/io_stm32image.c
@@ -5,17 +5,20 @@
*/
#include <assert.h>
-#include <boot_api.h>
-#include <debug.h>
#include <errno.h>
-#include <io_driver.h>
-#include <io_stm32image.h>
-#include <io_storage.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
-#include <utils.h>
+
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_storage.h>
+#include <drivers/st/io_stm32image.h>
+#include <lib/utils.h>
+#include <plat/common/platform.h>
+
+#include <boot_api.h>
static uintptr_t backend_dev_handle;
static uintptr_t backend_image_spec;
diff --git a/drivers/st/mmc/stm32_sdmmc2.c b/drivers/st/mmc/stm32_sdmmc2.c
index db5158156..787241d59 100644
--- a/drivers/st/mmc/stm32_sdmmc2.c
+++ b/drivers/st/mmc/stm32_sdmmc2.c
@@ -4,25 +4,27 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/mmc.h>
+#include <drivers/st/stm32_sdmmc2.h>
+#include <drivers/st/stm32mp1_clk.h>
+#include <drivers/st/stm32mp1_rcc.h>
+#include <drivers/st/stm32mp1_reset.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/reset/stm32mp1-resets.h>
-#include <errno.h>
#include <libfdt.h>
-#include <mmc.h>
-#include <mmio.h>
-#include <platform.h>
-#include <stm32_sdmmc2.h>
-#include <stm32mp1_clk.h>
+#include <lib/mmio.h>
+#include <lib/utils.h>
+#include <plat/common/platform.h>
+
#include <stm32mp1_dt.h>
-#include <stm32mp1_rcc.h>
-#include <stm32mp1_reset.h>
-#include <string.h>
-#include <utils.h>
/* Registers offsets */
#define SDMMC_POWER 0x00U
diff --git a/drivers/st/pmic/stm32_i2c.c b/drivers/st/pmic/stm32_i2c.c
index 098013947..f861ba296 100644
--- a/drivers/st/pmic/stm32_i2c.c
+++ b/drivers/st/pmic/stm32_i2c.c
@@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <mmio.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <stm32_i2c.h>
+
+#include <arch_helpers.h>
+#include <drivers/delay_timer.h>
+#include <drivers/st/stm32_i2c.h>
+#include <lib/mmio.h>
/* STM32 I2C registers offsets */
#define I2C_CR1 0x00U
diff --git a/drivers/st/pmic/stm32mp1_pmic.c b/drivers/st/pmic/stm32mp1_pmic.c
index 958de08d9..ee4402762 100644
--- a/drivers/st/pmic/stm32mp1_pmic.c
+++ b/drivers/st/pmic/stm32mp1_pmic.c
@@ -4,20 +4,24 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
+#include <stdbool.h>
+
#include <libfdt.h>
-#include <mmio.h>
-#include <mmio.h>
+
#include <platform_def.h>
-#include <stdbool.h>
-#include <stm32_gpio.h>
-#include <stm32mp1_clk.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/st/stm32_gpio.h>
+#include <drivers/st/stm32mp1_clk.h>
+#include <drivers/st/stm32mp1_pmic.h>
+#include <drivers/st/stpmu1.h>
+#include <lib/mmio.h>
+#include <lib/utils_def.h>
+
+#include <stm32mp1_def.h>
#include <stm32mp1_dt.h>
-#include <stm32mp1_pmic.h>
-#include <stpmu1.h>
-#include <utils_def.h>
/* I2C Timing hard-coded value, for I2C clock source is HSI at 64MHz */
#define I2C_TIMING 0x10D07DB5
diff --git a/drivers/st/pmic/stpmu1.c b/drivers/st/pmic/stpmu1.c
index 5951899a1..9c36bf64a 100644
--- a/drivers/st/pmic/stpmu1.c
+++ b/drivers/st/pmic/stpmu1.c
@@ -4,11 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <platform.h>
-#include <stpmu1.h>
#include <string.h>
+#include <common/debug.h>
+#include <drivers/st/stpmu1.h>
+#include <plat/common/platform.h>
+
struct regul_struct {
const char *dt_node_name;
const uint16_t *voltage_table;
diff --git a/drivers/st/reset/stm32mp1_reset.c b/drivers/st/reset/stm32mp1_reset.c
index 106bbfe62..f58e10b27 100644
--- a/drivers/st/reset/stm32mp1_reset.c
+++ b/drivers/st/reset/stm32mp1_reset.c
@@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bl_common.h>
-#include <debug.h>
#include <limits.h>
-#include <mmio.h>
+
#include <platform_def.h>
-#include <stm32mp1_rcc.h>
-#include <stm32mp1_reset.h>
-#include <utils_def.h>
+
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/st/stm32mp1_rcc.h>
+#include <drivers/st/stm32mp1_reset.h>
+#include <lib/mmio.h>
+#include <lib/utils_def.h>
#define RST_CLR_OFFSET 4U
diff --git a/drivers/st/uart/aarch32/stm32_console.S b/drivers/st/uart/aarch32/stm32_console.S
index 303d6bac7..4d00e68ab 100644
--- a/drivers/st/uart/aarch32/stm32_console.S
+++ b/drivers/st/uart/aarch32/stm32_console.S
@@ -7,8 +7,8 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
-#include <stm32_console.h>
-#include <stm32_uart_regs.h>
+#include <drivers/st/stm32_console.h>
+#include <drivers/st/stm32_uart_regs.h>
#define USART_TIMEOUT 0x1000
diff --git a/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c b/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c
index 716d15d18..74677f64c 100644
--- a/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c
+++ b/drivers/staging/renesas/rcar/ddr/ddr_a/ddr_init_e3.c
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
#include "boot_init_dram_regdef_e3.h"
#include "ddr_init_e3.h"
diff --git a/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram.c b/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram.c
index d7291315f..841eeb473 100644
--- a/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram.c
+++ b/drivers/staging/renesas/rcar/ddr/ddr_b/boot_init_dram.c
@@ -7,8 +7,10 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
-#include <mmio.h>
-#include <debug.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "ddr_regdef.h"
#include "init_dram_tbl_h3.h"
#include "init_dram_tbl_m3.h"
diff --git a/drivers/staging/renesas/rcar/ddr/dram_sub_func.c b/drivers/staging/renesas/rcar/ddr/dram_sub_func.c
index 4bf6942e0..82aa7f84d 100644
--- a/drivers/staging/renesas/rcar/ddr/dram_sub_func.c
+++ b/drivers/staging/renesas/rcar/ddr/dram_sub_func.c
@@ -4,8 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <mmio.h>
-#include <debug.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "dram_sub_func.h"
#define PRR (0xFFF00044U)
diff --git a/drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c b/drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c
index d75aa7c34..47fa837b3 100644
--- a/drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c
+++ b/drivers/staging/renesas/rcar/pfc/E3/pfc_init_e3.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h> /* for uint32_t */
-#include <mmio.h>
+
+#include <lib/mmio.h>
+
#include "pfc_init_e3.h"
#include "rcar_def.h"
diff --git a/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v1.c b/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v1.c
index 1c38f0600..f31d99e56 100644
--- a/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v1.c
+++ b/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v1.c
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <stdint.h> /* for uint32_t */
-#include <mmio.h>
+#include <stdint.h>
+#include <lib/mmio.h>
/* GPIO base address */
#define GPIO_BASE (0xE6050000U)
diff --git a/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v2.c b/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v2.c
index 3ed0cd3e4..e53235a20 100644
--- a/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v2.c
+++ b/drivers/staging/renesas/rcar/pfc/H3/pfc_init_h3_v2.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h> /* for uint32_t */
-#include <mmio.h>
+
+#include <lib/mmio.h>
+
#include "pfc_init_h3_v2.h"
#include "rcar_def.h"
diff --git a/drivers/staging/renesas/rcar/pfc/M3/pfc_init_m3.c b/drivers/staging/renesas/rcar/pfc/M3/pfc_init_m3.c
index 911ee8cc9..f7e66f245 100644
--- a/drivers/staging/renesas/rcar/pfc/M3/pfc_init_m3.c
+++ b/drivers/staging/renesas/rcar/pfc/M3/pfc_init_m3.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h> /* for uint32_t */
-#include <mmio.h>
+
+#include <lib/mmio.h>
+
#include "pfc_init_m3.h"
#include "rcar_def.h"
#include "rcar_private.h"
diff --git a/drivers/staging/renesas/rcar/pfc/M3N/pfc_init_m3n.c b/drivers/staging/renesas/rcar/pfc/M3N/pfc_init_m3n.c
index a2b6b34a1..e6b8a4f28 100644
--- a/drivers/staging/renesas/rcar/pfc/M3N/pfc_init_m3n.c
+++ b/drivers/staging/renesas/rcar/pfc/M3N/pfc_init_m3n.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h> /* for uint32_t */
-#include <mmio.h>
+
+#include <lib/mmio.h>
+
#include "pfc_init_m3n.h"
#include "rcar_def.h"
diff --git a/drivers/staging/renesas/rcar/pfc/pfc_init.c b/drivers/staging/renesas/rcar/pfc/pfc_init.c
index fceff3ddd..f20e8b0b5 100644
--- a/drivers/staging/renesas/rcar/pfc/pfc_init.c
+++ b/drivers/staging/renesas/rcar/pfc/pfc_init.c
@@ -5,8 +5,10 @@
*/
#include <stdint.h>
-#include <debug.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "rcar_def.h"
#if RCAR_LSI == RCAR_AUTO
#include "H3/pfc_init_h3_v1.h"
diff --git a/drivers/staging/renesas/rcar/qos/E3/qos_init_e3_v10.c b/drivers/staging/renesas/rcar/qos/E3/qos_init_e3_v10.c
index efe0c754d..593fefb62 100644
--- a/drivers/staging/renesas/rcar/qos/E3/qos_init_e3_v10.c
+++ b/drivers/staging/renesas/rcar/qos/E3/qos_init_e3_v10.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "../qos_reg.h"
#include "qos_init_e3_v10.h"
diff --git a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v10.c b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v10.c
index fd81187c8..21aa3df03 100644
--- a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v10.c
+++ b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v10.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "qos_init_h3_v10.h"
diff --git a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v11.c b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v11.c
index 1f6560050..5b7348ce0 100644
--- a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v11.c
+++ b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v11.c
@@ -5,8 +5,11 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include <rcar_def.h>
+
#include "../qos_common.h"
#include "qos_init_h3_v11.h"
diff --git a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v20.c b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v20.c
index 692236065..f27a7dce6 100644
--- a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v20.c
+++ b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v20.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "../qos_reg.h"
#include "qos_init_h3_v20.h"
diff --git a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v30.c b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v30.c
index 5986a3948..b3e65df94 100644
--- a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v30.c
+++ b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3_v30.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "../qos_reg.h"
#include "qos_init_h3_v30.h"
diff --git a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3n_v30.c b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3n_v30.c
index 58c37160e..e4909b9c1 100644
--- a/drivers/staging/renesas/rcar/qos/H3/qos_init_h3n_v30.c
+++ b/drivers/staging/renesas/rcar/qos/H3/qos_init_h3n_v30.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "../qos_reg.h"
#include "qos_init_h3n_v30.h"
diff --git a/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v10.c b/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v10.c
index a0d1e1473..c0846d2e2 100644
--- a/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v10.c
+++ b/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v10.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "qos_init_m3_v10.h"
diff --git a/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v11.c b/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v11.c
index fc0d2cce1..3186cf68f 100644
--- a/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v11.c
+++ b/drivers/staging/renesas/rcar/qos/M3/qos_init_m3_v11.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "../qos_reg.h"
#include "qos_init_m3_v11.h"
diff --git a/drivers/staging/renesas/rcar/qos/M3N/qos_init_m3n_v10.c b/drivers/staging/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
index e9d66761e..0be68c3cd 100644
--- a/drivers/staging/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
+++ b/drivers/staging/renesas/rcar/qos/M3N/qos_init_m3n_v10.c
@@ -5,7 +5,9 @@
*/
#include <stdint.h>
-#include <debug.h>
+
+#include <common/debug.h>
+
#include "../qos_common.h"
#include "../qos_reg.h"
#include "qos_init_m3n_v10.h"
diff --git a/drivers/staging/renesas/rcar/qos/qos_init.c b/drivers/staging/renesas/rcar/qos/qos_init.c
index 54c880309..1d1bcd59f 100644
--- a/drivers/staging/renesas/rcar/qos/qos_init.c
+++ b/drivers/staging/renesas/rcar/qos/qos_init.c
@@ -5,8 +5,10 @@
*/
#include <stdint.h>
-#include <debug.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include "qos_init.h"
#include "qos_common.h"
#if RCAR_LSI == RCAR_AUTO
diff --git a/drivers/synopsys/emmc/dw_mmc.c b/drivers/synopsys/emmc/dw_mmc.c
index eb428198f..0c5c64570 100644
--- a/drivers/synopsys/emmc/dw_mmc.c
+++ b/drivers/synopsys/emmc/dw_mmc.c
@@ -4,17 +4,18 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <dw_mmc.h>
#include <errno.h>
-#include <mmc.h>
-#include <mmio.h>
#include <string.h>
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/mmc.h>
+#include <drivers/synopsys/dw_mmc.h>
+#include <lib/mmio.h>
+
#define DWMMC_CTRL (0x00)
#define CTRL_IDMAC_EN (1 << 25)
#define CTRL_DMA_EN (1 << 5)
diff --git a/drivers/synopsys/ufs/dw_ufs.c b/drivers/synopsys/ufs/dw_ufs.c
index b0ea3e737..c7c8fc22d 100644
--- a/drivers/synopsys/ufs/dw_ufs.c
+++ b/drivers/synopsys/ufs/dw_ufs.c
@@ -5,12 +5,13 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <dw_ufs.h>
-#include <mmio.h>
#include <stdint.h>
#include <string.h>
-#include <ufs.h>
+
+#include <common/debug.h>
+#include <drivers/dw_ufs.h>
+#include <drivers/ufs.h>
+#include <lib/mmio.h>
static int dwufs_phy_init(ufs_params_t *params)
{
diff --git a/drivers/ti/uart/aarch64/16550_console.S b/drivers/ti/uart/aarch64/16550_console.S
index 785b640dd..3180593ad 100644
--- a/drivers/ti/uart/aarch64/16550_console.S
+++ b/drivers/ti/uart/aarch64/16550_console.S
@@ -9,7 +9,7 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
-#include <uart_16550.h>
+#include <drivers/ti/uart/uart_16550.h>
/*
* "core" functions are low-level implementations that don't require
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 515fc2785..2351c9b04 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -4,17 +4,19 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
#include <endian.h>
#include <errno.h>
-#include <mmio.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
-#include <ufs.h>
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/ufs.h>
+#include <lib/mmio.h>
#define CDB_ADDR_MASK 127
#define ALIGN_CDB(x) (((x) + CDB_ADDR_MASK) & ~CDB_ADDR_MASK)