lib: utils/ipi: Skip initialize ipi when dt is not enabled
authorXiang W <wxjstz@126.com>
Tue, 11 Jun 2024 11:19:28 +0000 (19:19 +0800)
committerAnup Patel <anup@brainfault.org>
Thu, 13 Jun 2024 13:00:27 +0000 (18:30 +0530)
When the dt node has a status property and the value is not ok or
okay, skip initializing ipi.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/utils/ipi/fdt_ipi.c

index 7762ababe5978c2c0c49117b4ece3558dfa0c25c..0b75093ebcd30cc5a13fd7a82c2c5d72ae6d680e 100644 (file)
@@ -44,6 +44,9 @@ static int fdt_ipi_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;