lib: utils: fdt_fixup: Allow preserving PMU properties

Add a Kconfig option to control PMU fixup, so the next
stage software can dump the PMU node including event
mapping information for debugging purposes.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Yu Chien Peter Lin 2023-11-30 20:42:08 +08:00 committed by Anup Patel
parent 535c661d87
commit 0b3262efc6
2 changed files with 10 additions and 0 deletions

View file

@ -15,4 +15,11 @@ config FDT_PMU
bool "FDT performance monitoring unit (PMU) support"
default n
config FDT_FIXUPS_PRESERVE_PMU_NODE
bool "Preserve PMU node in device-tree"
depends on FDT_PMU
default n
help
Preserve PMU node properties for debugging purposes.
endif

View file

@ -394,5 +394,8 @@ void fdt_fixups(void *fdt)
fdt_plic_fixup(fdt);
fdt_reserved_memory_fixup(fdt);
#ifndef CONFIG_FDT_FIXUPS_PRESERVE_PMU_NODE
fdt_pmu_fixup(fdt);
#endif
}