diff options
author | Marek Vasut <marex@denx.de> | 2020-04-22 13:18:10 +0200 |
---|---|---|
committer | Patrick Delaunay <patrick.delaunay@st.com> | 2020-05-14 09:02:12 +0200 |
commit | 65e38e81acb0c1eb0b0478626b1985e9ae9055c6 (patch) | |
tree | 8063ed6cd9e3be514691f100a012d2f6fb13d648 /arch/arm/mach-stm32mp/spl.c | |
parent | ec1ee5a9272f1393caf5275309cd08cf48e49dd0 (diff) | |
download | u-boot-65e38e81acb0c1eb0b0478626b1985e9ae9055c6.tar.gz u-boot-65e38e81acb0c1eb0b0478626b1985e9ae9055c6.tar.xz u-boot-65e38e81acb0c1eb0b0478626b1985e9ae9055c6.zip |
ARM: stm32: Add board_early_init_f() to SPL
Add weak implementation of board_early_init_f() hook into the
STM32MP1 SPL. This can be used to read out e.g. configuration
straps before initializing the DRAM.
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/spl.c')
-rw-r--r-- | arch/arm/mach-stm32mp/spl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index f85391c6af..9fbc3ac953 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -76,6 +76,11 @@ void spl_display_print(void) } #endif +__weak int board_early_init_f(void) +{ + return 0; +} + void board_init_f(ulong dummy) { struct udevice *dev; @@ -110,6 +115,12 @@ void board_init_f(ulong dummy) /* enable console uart printing */ preloader_console_init(); + ret = board_early_init_f(); + if (ret) { + debug("board_early_init_f() failed: %d\n", ret); + hang(); + } + ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { printf("DRAM init failed: %d\n", ret); |