diff options
| author | Anup Patel <anup.patel@oss.qualcomm.com> | 2026-02-13 11:23:40 +0530 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-03-22 10:55:03 +0530 |
| commit | e82d20122dcf97a357053636c1fc6d268bd4db5c (patch) | |
| tree | 70b642a96f7aa9d09ecadacfba8e815e85c4475b /lib/utils | |
| parent | b55bb4cdcb298c12a316713d6cc7948973c14f9b (diff) | |
| download | opensbi-e82d20122dcf97a357053636c1fc6d268bd4db5c.tar.gz opensbi-e82d20122dcf97a357053636c1fc6d268bd4db5c.tar.bz2 opensbi-e82d20122dcf97a357053636c1fc6d268bd4db5c.zip | |
lib: utils/irqchip: Add unique_id to plic, aplic, and imsic data
Add a 32-bit unique ID to plic, aplic, and imsic data which can be
used to differentiate multiple irqchip devices.
Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260213055342.3124872-7-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/fdt/fdt_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c index a8c6e1aa..b57eae1a 100644 --- a/lib/utils/fdt/fdt_helper.c +++ b/lib/utils/fdt/fdt_helper.c @@ -673,6 +673,7 @@ int fdt_parse_aplic_node(const void *fdt, int nodeoff, struct aplic_data *aplic) rc = fdt_get_node_addr_size(fdt, nodeoff, 0, ®_addr, ®_size); if (rc < 0 || !reg_size) return SBI_ENODEV; + aplic->unique_id = nodeoff; aplic->addr = reg_addr; aplic->size = reg_size; @@ -805,6 +806,7 @@ int fdt_parse_imsic_node(const void *fdt, int nodeoff, struct imsic_data *imsic) if (nodeoff < 0 || !imsic || !fdt) return SBI_ENODEV; + imsic->unique_id = nodeoff; imsic->targets_mmode = false; val = fdt_getprop(fdt, nodeoff, "interrupts-extended", &len); if (val && len > sizeof(fdt32_t)) { @@ -887,6 +889,7 @@ int fdt_parse_plic_node(const void *fdt, int nodeoffset, struct plic_data *plic) ®_addr, ®_size); if (rc < 0 || !reg_size) return SBI_ENODEV; + plic->unique_id = nodeoffset; plic->addr = reg_addr; plic->size = reg_size; |
