[PATCH 4/7] cyclic: Integrate cyclic functionality at bootup in board_r/f

Stefan Roese sr at denx.de
Wed May 25 09:40:16 CEST 2022


This patch adds a call to cyclic_init() to board_f/r.c, enabling the
common cyclic infrastructure. After this it's possible to add cyclic
functions via cyclic_register().

Signed-off-by: Stefan Roese <sr at denx.de>
---
 common/board_f.c | 2 ++
 common/board_r.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/common/board_f.c b/common/board_f.c
index 51d2f3c365e9..a02f435f477f 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -16,6 +16,7 @@
 #include <console.h>
 #include <cpu.h>
 #include <cpu_func.h>
+#include <cyclic.h>
 #include <dm.h>
 #include <env.h>
 #include <env_internal.h>
@@ -829,6 +830,7 @@ static const init_fnc_t init_sequence_f[] = {
 	initf_malloc,
 	log_init,
 	initf_bootstage,	/* uses its own timer, so does not need DM */
+	cyclic_init,
 	event_init,
 #ifdef CONFIG_BLOBLIST
 	bloblist_init,
diff --git a/common/board_r.c b/common/board_r.c
index 6f4aca2077d6..f8ea2a08ea12 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -13,6 +13,7 @@
 #include <api.h>
 #include <bootstage.h>
 #include <cpu_func.h>
+#include <cyclic.h>
 #include <exports.h>
 #include <flash.h>
 #include <hang.h>
@@ -600,6 +601,7 @@ static int run_main_loop(void)
 static init_fnc_t init_sequence_r[] = {
 	initr_trace,
 	initr_reloc,
+	cyclic_init,
 	event_init,
 	/* TODO: could x86/PPC have this also perhaps? */
 #if defined(CONFIG_ARM) || defined(CONFIG_RISCV)
-- 
2.36.1



More information about the U-Boot mailing list