mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-24 21:50:30 +09:00
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>
This commit is contained in:
parent
ec1ee5a927
commit
65e38e81ac
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user