diff mbox series

[v4,4/9] cyclic: Integrate cyclic functionality at bootup in board_r/f

Message ID 20220816102816.2938010-5-sr@denx.de
State Superseded
Delegated to: Tom Rini
Headers show
Series Add support for cyclic function execution infrastruture | expand

Commit Message

Stefan Roese Aug. 16, 2022, 10:28 a.m. UTC
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@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v4:
- Added Simon's RB tag

v3:
- No change

v2:
- No change

 common/board_f.c | 2 ++
 common/board_r.c | 2 ++
 2 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 18e2246733b0..deb46be18227 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 <display_options.h>
 #include <dm.h>
 #include <env.h>
@@ -828,6 +829,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 56eb60fa2753..cf89adfaa430 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 <display_options.h>
 #include <exports.h>
 #ifdef CONFIG_MTD_NOR_FLASH
@@ -591,6 +592,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)