diff options
author | Xiang W <wxjstz@126.com> | 2024-06-11 19:19:30 +0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2024-06-13 18:33:52 +0530 |
commit | b1c7c750f75dc027602688e4cb192d7b883c71d3 (patch) | |
tree | 60442e59be3368a0e71b7fdb1f551ee6c85decdf | |
parent | 5e3ad7d577573e158bb2ca90ae647d64db3f4a32 (diff) | |
download | opensbi-b1c7c750f75dc027602688e4cb192d7b883c71d3.zip opensbi-b1c7c750f75dc027602688e4cb192d7b883c71d3.tar.gz opensbi-b1c7c750f75dc027602688e4cb192d7b883c71d3.tar.bz2 |
lib: utils/irqchip: Skip initialize irqchip when dt is not enabled
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>
-rw-r--r-- | lib/utils/irqchip/fdt_irqchip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/irqchip/fdt_irqchip.c b/lib/utils/irqchip/fdt_irqchip.c index 1b6b674..c38b1d8 100644 --- a/lib/utils/irqchip/fdt_irqchip.c +++ b/lib/utils/irqchip/fdt_irqchip.c @@ -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) |