All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] rockchip: spl: replace ifdef by IS_ENABLED for timer_init() call condition
@ 2026-07-23 22:17 Johan Jonker
  2026-07-24  8:45 ` Quentin Schulz
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Jonker @ 2026-07-23 22:17 UTC (permalink / raw)
  To: u-boot; +Cc: kever.yang, sjg, ilias.apalodimas, trini, u-boot

Not all Rockchip SoC models use the ARM arch timer.
Call the function timer_init() only when
CONFIG_SYS_ARCH_TIMER is available.
Replace the ifdef call condition by IS_ENABLED
to increase build coverage and make the code easier to read.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Previous version not needed for serie, so resend separate.
https://patchwork.ozlabs.org/project/uboot/patch/20220403230659.12039-5-jbx6244@gmail.com/

Changed:
rebase
remove text
---
 arch/arm/mach-rockchip/spl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index e989c148079a..894c24608e64 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -122,10 +122,9 @@ void board_init_f(ulong dummy)

 	rockchip_stimer_init();

-#ifdef CONFIG_SYS_ARCH_TIMER
-	/* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */
-	timer_init();
-#endif
+	if (IS_ENABLED(CONFIG_SYS_ARCH_TIMER))
+		timer_init();
+
 #if !defined(CONFIG_TPL) || defined(CONFIG_SPL_RAM)
 	debug("\nspl:init dram\n");
 	ret = dram_init();
--
2.39.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-06 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 22:17 [PATCH v1] rockchip: spl: replace ifdef by IS_ENABLED for timer_init() call condition Johan Jonker
2026-07-24  8:45 ` Quentin Schulz
2026-07-24  9:53   ` Johan Jonker
2026-07-30 15:37     ` Quentin Schulz
2026-07-30 22:06       ` Tom Rini
2026-08-06 16:46         ` Quentin Schulz
2026-08-06 17:40           ` Jonas Karlman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.