diff mbox series

[3/5] board_init_f_r(): use static calls

Message ID 0adfb649adecfd0b11e764342ca22ea0ebe438fb.1734448827.git.jerome.forissier@linaro.org
State New
Headers show
Series Static initcalls | expand

Commit Message

Jerome Forissier Dec. 17, 2024, 3:59 p.m. UTC
Replace the init_sequence_f_r function array by direct calls.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
---
 common/board_f.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index ba1af3d8055..b2c83af943a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -1020,8 +1020,8 @@  void board_init_f(ulong boot_flags)
 /*
  * For now this code is only used on x86.
  *
- * init_sequence_f_r is the list of init functions which are run when
- * U-Boot is executing from Flash with a semi-limited 'C' environment.
+ * Run init functions which are run when U-Boot is executing from Flash with a
+ * semi-limited 'C' environment.
  * The following limitations must be considered when implementing an
  * '_f_r' function:
  *  - 'static' variables are read-only
@@ -1034,17 +1034,18 @@  void board_init_f(ulong boot_flags)
  * NOTE: At present only x86 uses this route, but it is intended that
  * all archs will move to this when generic relocation is implemented.
  */
-static const init_fnc_t init_sequence_f_r[] = {
-#if !CONFIG_IS_ENABLED(X86_64)
-	init_cache_f_r,
-#endif
+static int intcall_run_f_r(void)
+{
+	int ret = 0;
 
-	NULL,
-};
+	CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);))
+
+	return ret;
+}
 
 void board_init_f_r(void)
 {
-	if (initcall_run_list(init_sequence_f_r))
+	if (initcall_run_f_r())
 		hang();
 
 	/*