[PATCH 25/27] libfdt: Add support for disabling ordering check/fixup
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Feb 28 06:51:42 UTC 2020
From: Simon Glass <sjg at chromium.org>
Add a way to remove this check and the reordering code, which is
unnecessary if the dtb is known to be correctly ordered.
Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: David Gibson <david at gibson.dropbear.id.au>
Message-Id: <20200220214557.176528-8-sjg at chromium.org>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
cpukit/dtc/libfdt/fdt_rw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpukit/dtc/libfdt/fdt_rw.c b/cpukit/dtc/libfdt/fdt_rw.c
index fe13671eb6..13854253ff 100644
--- a/cpukit/dtc/libfdt/fdt_rw.c
+++ b/cpukit/dtc/libfdt/fdt_rw.c
@@ -435,7 +435,8 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize)
return struct_size;
}
- if (!fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
+ if (can_assume(LIBFDT_ORDER) |
+ !fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
/* no further work necessary */
err = fdt_move(fdt, buf, bufsize);
if (err)
--
2.16.4
More information about the devel
mailing list