aboutsummaryrefslogtreecommitdiff
path: root/drivers/st
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/st')
-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
14 files changed, 127 insertions, 98 deletions
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