aboutsummaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/fdt/fdt_fixup.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c
index 5fc76738..194e55b3 100644
--- a/lib/utils/fdt/fdt_fixup.c
+++ b/lib/utils/fdt/fdt_fixup.c
@@ -385,6 +385,21 @@ int fdt_reserved_memory_fixup(void *fdt)
return 0;
}
+void fdt_config_fixup(void *fdt)
+{
+ int chosen_offset, config_offset;
+
+ chosen_offset = fdt_path_offset(fdt, "/chosen");
+ if (chosen_offset < 0)
+ return;
+
+ config_offset = fdt_node_offset_by_compatible(fdt, chosen_offset, "opensbi,config");
+ if (chosen_offset < 0)
+ return;
+
+ fdt_nop_node(fdt, config_offset);
+}
+
void fdt_fixups(void *fdt)
{
fdt_aplic_fixup(fdt);
@@ -398,4 +413,6 @@ void fdt_fixups(void *fdt)
#ifndef CONFIG_FDT_FIXUPS_PRESERVE_PMU_NODE
fdt_pmu_fixup(fdt);
#endif
+
+ fdt_config_fixup(fdt);
}