dm: core: Update ofnode to read binman-style flash entry
At present ofnode_read_fmap_entry() reads a flash map entry in a format
which is not supported by binman. To allow use to use binman-format
descriptions, update this function.
Also add a simple test.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/dm/of_extra.h b/include/dm/of_extra.h
index 97988b6..ca15df2 100644
--- a/include/dm/of_extra.h
+++ b/include/dm/of_extra.h
@@ -11,7 +11,7 @@
enum fmap_compress_t {
FMAP_COMPRESS_NONE,
- FMAP_COMPRESS_LZO,
+ FMAP_COMPRESS_LZ4,
};
enum fmap_hash_t {
@@ -26,6 +26,7 @@
uint32_t length;
uint32_t used; /* Number of bytes used in region */
enum fmap_compress_t compress_algo; /* Compression type */
+ uint32_t unc_length; /* Uncompressed length */
enum fmap_hash_t hash_algo; /* Hash algorithm */
const uint8_t *hash; /* Hash value */
int hash_size; /* Hash size */