summaryrefslogtreecommitdiffstats
path: root/cpukit/dtc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-02-20 14:45:56 -0700
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-02 07:52:21 +0100
commit83cd34199aa80690e55958b07167d8809dfc4f83 (patch)
tree9d741cc0317ba254b0ee3670f5411450a80109dd /cpukit/dtc
parent0791bdf89e3f8839623a13305d9445440cbb0482 (diff)
downloadrtems-83cd34199aa80690e55958b07167d8809dfc4f83.tar.bz2
libfdt: Add support for disabling ordering check/fixup
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@chromium.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20200220214557.176528-8-sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'cpukit/dtc')
-rw-r--r--cpukit/dtc/libfdt/fdt_rw.c3
1 files changed, 2 insertions, 1 deletions
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)