Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH}
- include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for
includes isn't a good idea. It defeats one of the advantages of having
folders and it introduces problems that are sometimes subtle (because
you may not know the header you are actually including if there are two
of them).
For example, this patch had to be created because two headers were
called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform
to avoid collision."). More recently, this patch has had similar
problems: 46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit 4ecca33988b9 ("Move include and
source files to logical locations"). At that time, there weren't too
many headers so it wasn't a real issue. However, time has shown that
this creates problems.
Platforms that want to preserve the way they include headers may add the
removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/include/drivers/arm/cci.h b/include/drivers/arm/cci.h
index 24b76da..c5ddcfd 100644
--- a/include/drivers/arm/cci.h
+++ b/include/drivers/arm/cci.h
@@ -7,7 +7,7 @@
#ifndef CCI_H
#define CCI_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Slave interface offsets from PERIPHBASE */
#define SLAVE_IFACE6_OFFSET UL(0x7000)
diff --git a/include/drivers/arm/gic_common.h b/include/drivers/arm/gic_common.h
index a9ec7b7..3ac1b43 100644
--- a/include/drivers/arm/gic_common.h
+++ b/include/drivers/arm/gic_common.h
@@ -7,7 +7,7 @@
#ifndef GIC_COMMON_H
#define GIC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* GIC Distributor interface general definitions
diff --git a/include/drivers/arm/gicv2.h b/include/drivers/arm/gicv2.h
index 705077c..6bc5101 100644
--- a/include/drivers/arm/gicv2.h
+++ b/include/drivers/arm/gicv2.h
@@ -7,7 +7,7 @@
#ifndef GICV2_H
#define GICV2_H
-#include <gic_common.h>
+#include <drivers/arm/gic_common.h>
/*******************************************************************************
* GICv2 miscellaneous definitions
@@ -119,9 +119,10 @@
#ifndef __ASSEMBLY__
#include <cdefs.h>
-#include <interrupt_props.h>
#include <stdint.h>
+#include <common/interrupt_props.h>
+
/*******************************************************************************
* This structure describes some of the implementation defined attributes of
* the GICv2 IP. It is used by the platform port to specify these attributes
diff --git a/include/drivers/arm/gicv3.h b/include/drivers/arm/gicv3.h
index c26f297..2382697 100644
--- a/include/drivers/arm/gicv3.h
+++ b/include/drivers/arm/gicv3.h
@@ -209,12 +209,13 @@
#ifndef __ASSEMBLY__
-#include <arch_helpers.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <arch_helpers.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
static inline bool gicv3_is_intr_id_special_identifier(unsigned int id)
{
diff --git a/include/drivers/arm/pl011.h b/include/drivers/arm/pl011.h
index 6216a61..f201f00 100644
--- a/include/drivers/arm/pl011.h
+++ b/include/drivers/arm/pl011.h
@@ -7,7 +7,7 @@
#ifndef PL011_H
#define PL011_H
-#include <console.h>
+#include <drivers/console.h>
/* PL011 Registers */
#define UARTDR 0x000
diff --git a/include/drivers/arm/pl061_gpio.h b/include/drivers/arm/pl061_gpio.h
index 6c4a9f5..68238c9 100644
--- a/include/drivers/arm/pl061_gpio.h
+++ b/include/drivers/arm/pl061_gpio.h
@@ -7,7 +7,7 @@
#ifndef PL061_GPIO_H
#define PL061_GPIO_H
-#include <gpio.h>
+#include <drivers/gpio.h>
void pl061_gpio_register(uintptr_t base_addr, int gpio_dev);
void pl061_gpio_init(void);
diff --git a/include/drivers/arm/smmu_v3.h b/include/drivers/arm/smmu_v3.h
index 1b7ffb8..33f3d6f 100644
--- a/include/drivers/arm/smmu_v3.h
+++ b/include/drivers/arm/smmu_v3.h
@@ -8,7 +8,8 @@
#define SMMU_V3_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* SMMUv3 register offsets from device base */
#define SMMU_S_IDR1 U(0x8004)
diff --git a/include/drivers/arm/sp804_delay_timer.h b/include/drivers/arm/sp804_delay_timer.h
index 8eb8715..f8769e8 100644
--- a/include/drivers/arm/sp804_delay_timer.h
+++ b/include/drivers/arm/sp804_delay_timer.h
@@ -7,9 +7,9 @@
#ifndef SP804_DELAY_TIMER_H
#define SP804_DELAY_TIMER_H
-#include <delay_timer.h>
#include <stdint.h>
+#include <drivers/delay_timer.h>
uint32_t sp804_get_timer_value(void);
diff --git a/include/drivers/arm/sp805.h b/include/drivers/arm/sp805.h
index e7714a3..551bfe4 100644
--- a/include/drivers/arm/sp805.h
+++ b/include/drivers/arm/sp805.h
@@ -7,7 +7,7 @@
#ifndef SP805_H
#define SP805_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SP805 register offset */
#define SP805_WDOG_LOAD_OFF UL(0x000)
diff --git a/include/drivers/arm/tzc380.h b/include/drivers/arm/tzc380.h
index 19cf988..03b9b05 100644
--- a/include/drivers/arm/tzc380.h
+++ b/include/drivers/arm/tzc380.h
@@ -7,8 +7,8 @@
#ifndef TZC380_H
#define TZC380_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define TZC380_CONFIGURATION_OFF U(0x000)
#define ACTION_OFF U(0x004)
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h
index a7bb3f6..98ef0ec 100644
--- a/include/drivers/arm/tzc400.h
+++ b/include/drivers/arm/tzc400.h
@@ -7,8 +7,8 @@
#ifndef TZC400_H
#define TZC400_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define BUILD_CONFIG_OFF U(0x000)
#define GATE_KEEPER_OFF U(0x008)
diff --git a/include/drivers/arm/tzc_common.h b/include/drivers/arm/tzc_common.h
index 4b81547..4820baa 100644
--- a/include/drivers/arm/tzc_common.h
+++ b/include/drivers/arm/tzc_common.h
@@ -7,7 +7,7 @@
#ifndef TZC_COMMON_H
#define TZC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* Offset of core registers from the start of the base of configuration
diff --git a/include/drivers/arm/tzc_dmc500.h b/include/drivers/arm/tzc_dmc500.h
index df6e7f9..24bfaeb 100644
--- a/include/drivers/arm/tzc_dmc500.h
+++ b/include/drivers/arm/tzc_dmc500.h
@@ -7,8 +7,8 @@
#ifndef TZC_DMC500_H
#define TZC_DMC500_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define SI_STATUS_OFFSET U(0x000)
#define SI_STATE_CTRL_OFFSET U(0x030)
diff --git a/include/drivers/arm/tzc_dmc620.h b/include/drivers/arm/tzc_dmc620.h
index 074bbc1..e0e6760 100644
--- a/include/drivers/arm/tzc_dmc620.h
+++ b/include/drivers/arm/tzc_dmc620.h
@@ -7,7 +7,7 @@
#ifndef TZC_DMC620_H
#define TZC_DMC620_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DMC-620 memc register offsets */
#define DMC620_MEMC_STATUS U(0x0000)
diff --git a/include/drivers/auth/auth_mod.h b/include/drivers/auth/auth_mod.h
index 19bc2f1..9089953 100644
--- a/include/drivers/auth/auth_mod.h
+++ b/include/drivers/auth/auth_mod.h
@@ -9,10 +9,10 @@
#if TRUSTED_BOARD_BOOT
-#include <auth_common.h>
-#include <cot_def.h>
-#include <img_parser_mod.h>
-#include <tbbr_img_def.h>
+#include <common/tbbr/cot_def.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/img_parser_mod.h>
/*
* Image flags
diff --git a/include/drivers/auth/img_parser_mod.h b/include/drivers/auth/img_parser_mod.h
index 4379693..b2fb60e 100644
--- a/include/drivers/auth/img_parser_mod.h
+++ b/include/drivers/auth/img_parser_mod.h
@@ -7,7 +7,7 @@
#ifndef IMG_PARSER_MOD_H
#define IMG_PARSER_MOD_H
-#include <auth_common.h>
+#include <drivers/auth/auth_common.h>
/*
* Return values
diff --git a/include/drivers/cadence/cdns_uart.h b/include/drivers/cadence/cdns_uart.h
index 490be10..0a1cf77 100644
--- a/include/drivers/cadence/cdns_uart.h
+++ b/include/drivers/cadence/cdns_uart.h
@@ -7,7 +7,7 @@
#ifndef CDNS_UART_H
#define CDNS_UART_H
-#include <console.h>
+#include <drivers/console.h>
/* This is very minimalistic and will only work in QEMU. */
diff --git a/include/drivers/console.h b/include/drivers/console.h
index 02f2f8a..24887f9 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -7,7 +7,7 @@
#ifndef CONSOLE_H
#define CONSOLE_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define CONSOLE_T_NEXT (U(0) * REGSZ)
#define CONSOLE_T_FLAGS (U(1) * REGSZ)
@@ -44,7 +44,9 @@
int (*const flush)(struct console *console);
/* Additional private driver data may follow here. */
} console_t;
-#include <console_assertions.h> /* offset macro assertions for console_t */
+
+/* offset macro assertions for console_t */
+#include <drivers/console_assertions.h>
/*
* NOTE: There is no publicly accessible console_register() function. Consoles
diff --git a/include/drivers/console_assertions.h b/include/drivers/console_assertions.h
index 559bb50..00caa31 100644
--- a/include/drivers/console_assertions.h
+++ b/include/drivers/console_assertions.h
@@ -7,7 +7,7 @@
#ifndef CONSOLE_ASSERTIONS_H
#define CONSOLE_ASSERTIONS_H
-#include <cassert.h>
+#include <lib/cassert.h>
/*
* This file contains some separate assertions about console_t, moved here to
diff --git a/include/drivers/coreboot/cbmem_console.h b/include/drivers/coreboot/cbmem_console.h
index 7fe7a72..40c90e6 100644
--- a/include/drivers/coreboot/cbmem_console.h
+++ b/include/drivers/coreboot/cbmem_console.h
@@ -7,7 +7,7 @@
#ifndef CBMEM_CONSOLE_H
#define CBMEM_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_CBMC_BASE CONSOLE_T_DRVDATA
#define CONSOLE_T_CBMC_SIZE (CONSOLE_T_DRVDATA + REGSZ)
diff --git a/include/drivers/io/io_block.h b/include/drivers/io/io_block.h
index d6d32f9..c99e8c7 100644
--- a/include/drivers/io/io_block.h
+++ b/include/drivers/io/io_block.h
@@ -7,7 +7,7 @@
#ifndef IO_BLOCK_H
#define IO_BLOCK_H
-#include <io_storage.h>
+#include <drivers/io/io_storage.h>
/* block devices ops */
typedef struct io_block_ops {
diff --git a/include/drivers/io/io_driver.h b/include/drivers/io/io_driver.h
index 587f137..2b704f4 100644
--- a/include/drivers/io/io_driver.h
+++ b/include/drivers/io/io_driver.h
@@ -7,9 +7,9 @@
#ifndef IO_DRIVER_H
#define IO_DRIVER_H
-#include <io_storage.h>
#include <stdint.h>
+#include <drivers/io/io_storage.h>
/* Generic IO entity structure,representing an accessible IO construct on the
* device, such as a file */
diff --git a/include/drivers/io/io_storage.h b/include/drivers/io/io_storage.h
index c496d48..ec6db3f 100644
--- a/include/drivers/io/io_storage.h
+++ b/include/drivers/io/io_storage.h
@@ -10,8 +10,8 @@
#include <errno.h>
#include <stdint.h>
#include <stdio.h> /* For ssize_t */
-#include <uuid.h>
+#include <tools_share/uuid.h>
/* Device type which can be used to enable policy decisions about which device
* to access */
diff --git a/include/drivers/marvell/ccu.h b/include/drivers/marvell/ccu.h
index 2757765..546d9f1 100644
--- a/include/drivers/marvell/ccu.h
+++ b/include/drivers/marvell/ccu.h
@@ -11,7 +11,7 @@
#define CCU_H
#ifndef __ASSEMBLY__
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
#endif
/* CCU registers definitions */
diff --git a/include/drivers/marvell/gwin.h b/include/drivers/marvell/gwin.h
index 6b7f175..1b874a7 100644
--- a/include/drivers/marvell/gwin.h
+++ b/include/drivers/marvell/gwin.h
@@ -10,7 +10,7 @@
#ifndef GWIN_H
#define GWIN_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
int init_gwin(int ap_index);
void gwin_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
diff --git a/include/drivers/marvell/io_win.h b/include/drivers/marvell/io_win.h
index 45e8666..7438d6b 100644
--- a/include/drivers/marvell/io_win.h
+++ b/include/drivers/marvell/io_win.h
@@ -10,7 +10,7 @@
#ifndef IO_WIN_H
#define IO_WIN_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
int init_io_win(int ap_index);
void iow_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
diff --git a/include/drivers/marvell/iob.h b/include/drivers/marvell/iob.h
index ccbdf96..9b5e515 100644
--- a/include/drivers/marvell/iob.h
+++ b/include/drivers/marvell/iob.h
@@ -10,7 +10,7 @@
#ifndef IOB_H
#define IOB_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
enum target_ids_iob {
INTERNAL_TID = 0x0,
diff --git a/include/drivers/marvell/mochi/cp110_setup.h b/include/drivers/marvell/mochi/cp110_setup.h
index 18d9f18..3686257 100644
--- a/include/drivers/marvell/mochi/cp110_setup.h
+++ b/include/drivers/marvell/mochi/cp110_setup.h
@@ -10,7 +10,8 @@
#ifndef CP110_SETUP_H
#define CP110_SETUP_H
-#include <mmio.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
#define MVEBU_DEVICE_ID_REG (MVEBU_CP_DFX_OFFSET + 0x40)
diff --git a/include/drivers/marvell/uart/a3700_console.h b/include/drivers/marvell/uart/a3700_console.h
index 01335a2..5511d96 100644
--- a/include/drivers/marvell/uart/a3700_console.h
+++ b/include/drivers/marvell/uart/a3700_console.h
@@ -8,7 +8,7 @@
#ifndef A3700_CONSOLE_H
#define A3700_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
/* MVEBU UART Registers */
#define UART_RX_REG 0x00
diff --git a/include/drivers/meson/meson_console.h b/include/drivers/meson/meson_console.h
index 759571d..5da1e3f 100644
--- a/include/drivers/meson/meson_console.h
+++ b/include/drivers/meson/meson_console.h
@@ -7,7 +7,7 @@
#ifndef MESON_CONSOLE_H
#define MESON_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_MESON_BASE CONSOLE_T_DRVDATA
diff --git a/include/drivers/mmc.h b/include/drivers/mmc.h
index a62928b..2aaa28d 100644
--- a/include/drivers/mmc.h
+++ b/include/drivers/mmc.h
@@ -8,7 +8,8 @@
#define MMC_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
#define MMC_BLOCK_SIZE U(512)
#define MMC_BLOCK_MASK (MMC_BLOCK_SIZE - U(1))
diff --git a/include/drivers/partition/gpt.h b/include/drivers/partition/gpt.h
index 7984e4d..3ae160f 100644
--- a/include/drivers/partition/gpt.h
+++ b/include/drivers/partition/gpt.h
@@ -7,7 +7,7 @@
#ifndef GPT_H
#define GPT_H
-#include <partition.h>
+#include <drivers/partition/partition.h>
#define PARTITION_TYPE_GPT 0xee
#define GPT_HEADER_OFFSET PARTITION_BLOCK_SIZE
diff --git a/include/drivers/partition/partition.h b/include/drivers/partition/partition.h
index 2aeaace..d94c782 100644
--- a/include/drivers/partition/partition.h
+++ b/include/drivers/partition/partition.h
@@ -7,9 +7,10 @@
#ifndef PARTITION_H
#define PARTITION_H
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
#if !PLAT_PARTITION_MAX_ENTRIES
# define PLAT_PARTITION_MAX_ENTRIES 128
#endif /* PLAT_PARTITION_MAX_ENTRIES */
diff --git a/include/drivers/st/io_mmc.h b/include/drivers/st/io_mmc.h
index de71e7d..b35b4b5 100644
--- a/include/drivers/st/io_mmc.h
+++ b/include/drivers/st/io_mmc.h
@@ -7,7 +7,7 @@
#ifndef IO_MMC_H
#define IO_MMC_H
-#include <io_driver.h>
+#include <drivers/io/io_driver.h>
int register_io_dev_mmc(const io_dev_connector_t **dev_con);
diff --git a/include/drivers/st/io_stm32image.h b/include/drivers/st/io_stm32image.h
index b668219..6806055 100644
--- a/include/drivers/st/io_stm32image.h
+++ b/include/drivers/st/io_stm32image.h
@@ -7,8 +7,8 @@
#ifndef IO_STM32IMAGE_H
#define IO_STM32IMAGE_H
-#include <io_driver.h>
-#include <partition.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/partition/partition.h>
#define MAX_LBA_SIZE 512
#define MAX_PART_NAME_SIZE (EFI_NAMELEN + 1)
diff --git a/include/drivers/st/stm32_console.h b/include/drivers/st/stm32_console.h
index 57e6d74..b303768 100644
--- a/include/drivers/st/stm32_console.h
+++ b/include/drivers/st/stm32_console.h
@@ -7,7 +7,7 @@
#ifndef STM32_CONSOLE_H
#define STM32_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_STM32_BASE CONSOLE_T_DRVDATA
diff --git a/include/drivers/st/stm32_gpio.h b/include/drivers/st/stm32_gpio.h
index 938922b..acd95ec 100644
--- a/include/drivers/st/stm32_gpio.h
+++ b/include/drivers/st/stm32_gpio.h
@@ -7,7 +7,7 @@
#ifndef STM32_GPIO_H
#define STM32_GPIO_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define STM32_GPIOA_BANK U(0x50002000)
#define STM32_GPIOZ_BANK U(0x54004000)
diff --git a/include/drivers/st/stm32_i2c.h b/include/drivers/st/stm32_i2c.h
index 4760c00..de2ca59 100644
--- a/include/drivers/st/stm32_i2c.h
+++ b/include/drivers/st/stm32_i2c.h
@@ -8,7 +8,8 @@
#define STM32_I2C_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Bit definition for I2C_CR1 register */
#define I2C_CR1_PE BIT(0)
diff --git a/include/drivers/st/stm32_sdmmc2.h b/include/drivers/st/stm32_sdmmc2.h
index b172659..aa9472c 100644
--- a/include/drivers/st/stm32_sdmmc2.h
+++ b/include/drivers/st/stm32_sdmmc2.h
@@ -7,9 +7,10 @@
#ifndef STM32_SDMMC2_H
#define STM32_SDMMC2_H
-#include <mmc.h>
#include <stdbool.h>
+#include <drivers/mmc.h>
+
struct stm32_sdmmc2_params {
uintptr_t reg_base;
unsigned int clk_rate;
diff --git a/include/drivers/st/stm32_uart_regs.h b/include/drivers/st/stm32_uart_regs.h
index e78d3d4..14b296c 100644
--- a/include/drivers/st/stm32_uart_regs.h
+++ b/include/drivers/st/stm32_uart_regs.h
@@ -7,7 +7,7 @@
#ifndef STM32_UART_REGS_H
#define STM32_UART_REGS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define USART_CR1 U(0x00)
#define USART_CR2 U(0x04)
diff --git a/include/drivers/st/stm32mp1_clk.h b/include/drivers/st/stm32mp1_clk.h
index c895517..5594e23 100644
--- a/include/drivers/st/stm32mp1_clk.h
+++ b/include/drivers/st/stm32mp1_clk.h
@@ -7,9 +7,10 @@
#ifndef STM32MP1_CLK_H
#define STM32MP1_CLK_H
-#include <arch_helpers.h>
#include <stdbool.h>
+#include <arch_helpers.h>
+
int stm32mp1_clk_probe(void);
int stm32mp1_clk_init(void);
bool stm32mp1_clk_is_enabled(unsigned long id);
diff --git a/include/drivers/st/stm32mp1_clkfunc.h b/include/drivers/st/stm32mp1_clkfunc.h
index 2467af9..106dcae 100644
--- a/include/drivers/st/stm32mp1_clkfunc.h
+++ b/include/drivers/st/stm32mp1_clkfunc.h
@@ -7,9 +7,10 @@
#ifndef STM32MP1_CLKFUNC_H
#define STM32MP1_CLKFUNC_H
-#include <libfdt.h>
#include <stdbool.h>
+#include <libfdt.h>
+
enum stm32mp_osc_id {
_HSI,
_HSE,
diff --git a/include/drivers/st/stm32mp1_ddr_regs.h b/include/drivers/st/stm32mp1_ddr_regs.h
index 288e072..bfcd5e2 100644
--- a/include/drivers/st/stm32mp1_ddr_regs.h
+++ b/include/drivers/st/stm32mp1_ddr_regs.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_DDR_REGS_H
#define STM32MP1_DDR_REGS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DDR3/LPDDR2/LPDDR3 Controller (DDRCTRL) registers */
struct stm32mp1_ddrctl {
diff --git a/include/drivers/st/stm32mp1_pmic.h b/include/drivers/st/stm32mp1_pmic.h
index cc80b25..256e340 100644
--- a/include/drivers/st/stm32mp1_pmic.h
+++ b/include/drivers/st/stm32mp1_pmic.h
@@ -9,6 +9,8 @@
#include <stdbool.h>
+#include <stm32mp1_def.h>
+
bool dt_check_pmic(void);
int dt_pmic_enable_boot_on_regulators(void);
void initialize_pmic_i2c(void);
diff --git a/include/drivers/st/stm32mp1_pwr.h b/include/drivers/st/stm32mp1_pwr.h
index b34536e..e17df44 100644
--- a/include/drivers/st/stm32mp1_pwr.h
+++ b/include/drivers/st/stm32mp1_pwr.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_PWR_H
#define STM32MP1_PWR_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define PWR_CR1 U(0x00)
#define PWR_CR2 U(0x08)
diff --git a/include/drivers/st/stm32mp1_rcc.h b/include/drivers/st/stm32mp1_rcc.h
index 87f4d7f..fd406c5 100644
--- a/include/drivers/st/stm32mp1_rcc.h
+++ b/include/drivers/st/stm32mp1_rcc.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_RCC_H
#define STM32MP1_RCC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define RCC_TZCR U(0x00)
#define RCC_OCENSETR U(0x0C)
diff --git a/include/drivers/st/stpmu1.h b/include/drivers/st/stpmu1.h
index 4bbcebb..e75d9a6 100644
--- a/include/drivers/st/stpmu1.h
+++ b/include/drivers/st/stpmu1.h
@@ -7,8 +7,8 @@
#ifndef STPMU1_H
#define STPMU1_H
-#include <stm32_i2c.h>
-#include <utils_def.h>
+#include <drivers/st/stm32_i2c.h>
+#include <lib/utils_def.h>
#define TURN_ON_REG 0x1U
#define TURN_OFF_REG 0x2U
diff --git a/include/drivers/synopsys/dw_mmc.h b/include/drivers/synopsys/dw_mmc.h
index 533a876..7031e0f 100644
--- a/include/drivers/synopsys/dw_mmc.h
+++ b/include/drivers/synopsys/dw_mmc.h
@@ -7,7 +7,7 @@
#ifndef DW_MMC_H
#define DW_MMC_H
-#include <mmc.h>
+#include <drivers/mmc.h>
typedef struct dw_mmc_params {
uintptr_t reg_base;
diff --git a/include/drivers/ti/uart/uart_16550.h b/include/drivers/ti/uart/uart_16550.h
index ad80c57..92b1ea8 100644
--- a/include/drivers/ti/uart/uart_16550.h
+++ b/include/drivers/ti/uart/uart_16550.h
@@ -7,7 +7,7 @@
#ifndef UART_16550_H
#define UART_16550_H
-#include <console.h>
+#include <drivers/console.h>
/* UART16550 Registers */
#define UARTTX 0x0
diff --git a/include/drivers/ufs.h b/include/drivers/ufs.h
index 414649b..a10cd80 100644
--- a/include/drivers/ufs.h
+++ b/include/drivers/ufs.h
@@ -7,7 +7,7 @@
#ifndef UFS_H
#define UFS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* register map of UFSHCI */
/* Controller Capabilities */