From: Xiang W Date: Tue, 11 Jun 2024 11:19:29 +0000 (+0800) Subject: lib: utils/timer: Skip initialize timer when dt is not enabled X-Git-Tag: v1.5~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e3ad7d577573e158bb2ca90ae647d64db3f4a32;p=platform%2Fkernel%2Fopensbi.git lib: utils/timer: Skip initialize timer when dt is not enabled When the dt node has a status property and the value is not ok or okay, skip initializing timer. Signed-off-by: Xiang W Reviewed-by: Anup Patel --- diff --git a/lib/utils/timer/fdt_timer.c b/lib/utils/timer/fdt_timer.c index 62426a7..f468730 100644 --- a/lib/utils/timer/fdt_timer.c +++ b/lib/utils/timer/fdt_timer.c @@ -44,6 +44,9 @@ static int fdt_timer_cold_init(void) noff = -1; while ((noff = fdt_find_match(fdt, noff, drv->match_table, &match)) >= 0) { + if (!fdt_node_is_enabled(fdt, noff)) + continue; + /* drv->cold_init must not be NULL */ if (drv->cold_init == NULL) return SBI_EFAIL;