aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXiang W <wxjstz@126.com>2024-06-11 19:19:28 +0800
committerAnup Patel <anup@brainfault.org>2024-06-13 18:30:27 +0530
commitc5be0e1ed1fa17b9f9abb49e80db014e067523e4 (patch)
treed9bc2872396fd4b496ea895cc77d98c91126c7cc /lib
parentdf3db6a9012916c44bcab221e6d6a264d9621b30 (diff)
downloadopensbi-c5be0e1ed1fa17b9f9abb49e80db014e067523e4.zip
opensbi-c5be0e1ed1fa17b9f9abb49e80db014e067523e4.tar.gz
opensbi-c5be0e1ed1fa17b9f9abb49e80db014e067523e4.tar.bz2
lib: utils/ipi: Skip initialize ipi when dt is not enabled
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/ipi/fdt_ipi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/ipi/fdt_ipi.c b/lib/utils/ipi/fdt_ipi.c
index 7762aba..0b75093 100644
--- a/lib/utils/ipi/fdt_ipi.c
+++ b/lib/utils/ipi/fdt_ipi.c
@@ -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;