diff options
author | Anup Patel <apatel@ventanamicro.com> | 2024-06-05 10:48:46 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2024-06-05 10:54:59 +0530 |
commit | df3db6a9012916c44bcab221e6d6a264d9621b30 (patch) | |
tree | b65a069cc25e3c8070dc071d5977e35c63d318b0 /lib/utils/fdt | |
parent | d962db280725b03a0340e05a07e4c85c93f35bc5 (diff) | |
download | opensbi-df3db6a9012916c44bcab221e6d6a264d9621b30.zip opensbi-df3db6a9012916c44bcab221e6d6a264d9621b30.tar.gz opensbi-df3db6a9012916c44bcab221e6d6a264d9621b30.tar.bz2 |
lib: utils/fdt: Fix DT property for APLIC delegation
During Linux AIA driver review, the APLIC DT property for interrupt
delegation was renamed to "riscv,delegation" so let's use the new DT
property name and fallback to old DT property name if the new DT
property name is not available.
Fixes: 34612193af92 ("lib: utils/irqchip: Add FDT based driver for APLIC")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Diffstat (limited to 'lib/utils/fdt')
-rw-r--r-- | lib/utils/fdt/fdt_helper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c index a0e93b9..9a945af 100644 --- a/lib/utils/fdt/fdt_helper.c +++ b/lib/utils/fdt/fdt_helper.c @@ -720,7 +720,9 @@ aplic_msi_parent_done: deleg->child_index = 0; } - del = fdt_getprop(fdt, nodeoff, "riscv,delegate", &len); + del = fdt_getprop(fdt, nodeoff, "riscv,delegation", &len); + if (!del) + del = fdt_getprop(fdt, nodeoff, "riscv,delegate", &len); if (!del || len < (3 * sizeof(fdt32_t))) goto skip_delegate_parse; d = 0; |