stm32mp1: do not include platform header files directly in drivers
Instead, only platform_def.h is included.
The required files to be included are added in stm32mp1_def.h.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
diff --git a/drivers/st/clk/stm32mp1_clk.c b/drivers/st/clk/stm32mp1_clk.c
index 7a88986..e4cc9b9 100644
--- a/drivers/st/clk/stm32mp1_clk.c
+++ b/drivers/st/clk/stm32mp1_clk.c
@@ -11,6 +11,8 @@
#include <libfdt.h>
+#include <platform_def.h>
+
#include <arch.h>
#include <arch_helpers.h>
#include <common/debug.h>
@@ -25,9 +27,6 @@
#include <lib/utils_def.h>
#include <plat/common/platform.h>
-#include <stm32mp1_dt.h>
-#include <stm32mp1_private.h>
-
#define MAX_HSI_HZ 64000000
#define TIMEOUT_200MS (plat_get_syscnt_freq2() / 5U)
diff --git a/drivers/st/clk/stm32mp1_clkfunc.c b/drivers/st/clk/stm32mp1_clkfunc.c
index 1791919..1d92271 100644
--- a/drivers/st/clk/stm32mp1_clkfunc.c
+++ b/drivers/st/clk/stm32mp1_clkfunc.c
@@ -8,12 +8,12 @@
#include <libfdt.h>
+#include <platform_def.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"
#define DT_RCC_CLK_COMPAT "st,stm32mp1-rcc"
#define DT_RCC_COMPAT "syscon"
diff --git a/drivers/st/ddr/stm32mp1_ddr.c b/drivers/st/ddr/stm32mp1_ddr.c
index a2b0e9e..aca0450 100644
--- a/drivers/st/ddr/stm32mp1_ddr.c
+++ b/drivers/st/ddr/stm32mp1_ddr.c
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <platform_def.h>
+
#include <arch.h>
#include <arch_helpers.h>
#include <common/debug.h>
@@ -21,9 +23,6 @@
#include <lib/mmio.h>
#include <plat/common/platform.h>
-#include <stm32mp1_def.h>
-#include <stm32mp1_dt.h>
-
struct reg_desc {
const char *name;
uint16_t offset; /* Offset for base address */
diff --git a/drivers/st/ddr/stm32mp1_ram.c b/drivers/st/ddr/stm32mp1_ram.c
index 1c82179..127b6c7 100644
--- a/drivers/st/ddr/stm32mp1_ram.c
+++ b/drivers/st/ddr/stm32mp1_ram.c
@@ -20,10 +20,6 @@
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <lib/mmio.h>
-#include <boot_api.h>
-#include <stm32mp1_dt.h>
-#include <stm32mp1_private.h>
-
#define DDR_PATTERN 0xAAAAAAAAU
#define DDR_ANTIPATTERN 0x55555555U
diff --git a/drivers/st/io/io_stm32image.c b/drivers/st/io/io_stm32image.c
index ba612e2..0164a2d 100644
--- a/drivers/st/io/io_stm32image.c
+++ b/drivers/st/io/io_stm32image.c
@@ -18,8 +18,6 @@
#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;
static uint32_t *stm32_img;
diff --git a/drivers/st/mmc/stm32_sdmmc2.c b/drivers/st/mmc/stm32_sdmmc2.c
index 787241d..05f5ae1 100644
--- a/drivers/st/mmc/stm32_sdmmc2.c
+++ b/drivers/st/mmc/stm32_sdmmc2.c
@@ -8,6 +8,10 @@
#include <errno.h>
#include <string.h>
+#include <libfdt.h>
+
+#include <platform_def.h>
+
#include <arch.h>
#include <arch_helpers.h>
#include <common/debug.h>
@@ -19,13 +23,10 @@
#include <drivers/st/stm32mp1_reset.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/reset/stm32mp1-resets.h>
-#include <libfdt.h>
#include <lib/mmio.h>
#include <lib/utils.h>
#include <plat/common/platform.h>
-#include <stm32mp1_dt.h>
-
/* Registers offsets */
#define SDMMC_POWER 0x00U
#define SDMMC_CLKCR 0x04U
diff --git a/drivers/st/pmic/stm32mp1_pmic.c b/drivers/st/pmic/stm32mp1_pmic.c
index ee44027..c5bdfc0 100644
--- a/drivers/st/pmic/stm32mp1_pmic.c
+++ b/drivers/st/pmic/stm32mp1_pmic.c
@@ -20,9 +20,6 @@
#include <lib/mmio.h>
#include <lib/utils_def.h>
-#include <stm32mp1_def.h>
-#include <stm32mp1_dt.h>
-
/* I2C Timing hard-coded value, for I2C clock source is HSI at 64MHz */
#define I2C_TIMING 0x10D07DB5