@@ -272,6 +272,13 @@ config SPL_TEXT_BASE
help
The address in memory that SPL will be running from.
+config SPL_SOC_INIT
+ bool "Call SoC-specific initialization in SPL"
+ help
+ If this option is enabled, U-Boot will call the function
+ spl_soc_init() from board_init_r(). This function should be
+ provided by the SoC vendor.
+
config SPL_BOARD_INIT
bool "Call board-specific initialization in SPL"
help
@@ -711,6 +711,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
}
}
+ if (CONFIG_IS_ENABLED(SOC_INIT))
+ spl_soc_init();
+
if (CONFIG_IS_ENABLED(BOARD_INIT))
spl_board_init();
@@ -816,6 +816,14 @@ int spl_early_init(void);
*/
int spl_init(void);
+/*
+ * spl_soc_init() - Do architecture-specific init in SPL
+ *
+ * If SPL_SOC_INIT is enabled, this is called from board_init_r() before
+ * jumping to the next phase.
+ */
+void spl_soc_init(void);
+
/*
* spl_board_init() - Do board-specific init in SPL
*