diff options
author | Simon Glass <sjg@chromium.org> | 2020-02-20 14:45:56 -0700 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-02-24 13:38:44 +1100 |
commit | f270f45fd5d2baac37d559f0063110cb646b2332 (patch) | |
tree | d7543be4ea99de2055a5411e35a876f211e3692d /libfdt/fdt_rw.c | |
parent | c18bae9a4c96a9258fdcee30fe4b0c4fc3730036 (diff) | |
download | dtc-f270f45fd5d2baac37d559f0063110cb646b2332.zip dtc-f270f45fd5d2baac37d559f0063110cb646b2332.tar.gz dtc-f270f45fd5d2baac37d559f0063110cb646b2332.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 'libfdt/fdt_rw.c')
-rw-r--r-- | libfdt/fdt_rw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c index fe13671..1385425 100644 --- a/libfdt/fdt_rw.c +++ b/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) |