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

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

index 1b6b6748523cfd84f3b1c7660147e859718e92ec..c38b1d85498838b22f3fa46789d0cd9533a5cadf 100644 (file)
@@ -62,6 +62,9 @@ static int fdt_irqchip_cold_init(void)
                drv_added = false;
                while ((noff = fdt_find_match(fdt, noff,
                                        drv->match_table, &match)) >= 0) {
+                       if (!fdt_node_is_enabled(fdt,noff))
+                               continue;
+
                        if (drv->cold_init) {
                                rc = drv->cold_init(fdt, noff, match);
                                if (rc == SBI_ENODEV)