summaryrefslogtreecommitdiff
path: root/include/fdtdec.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-23 18:58:52 -0600
committerSimon Glass <sjg@chromium.org>2014-11-21 04:43:17 +0100
commitf3cc44f9849fa7682d759621a74fb189a994e3b2 (patch)
treed65f60627666cc2a9301e99d340c72db51cb3ac0 /include/fdtdec.h
parent76489832b28d158dd341b8992006576584cd204b (diff)
downloadu-boot-imx-f3cc44f9849fa7682d759621a74fb189a994e3b2.zip
u-boot-imx-f3cc44f9849fa7682d759621a74fb189a994e3b2.tar.gz
u-boot-imx-f3cc44f9849fa7682d759621a74fb189a994e3b2.tar.bz2
fdt: Enhance flashmap function to deal with region properties
Flash regions can optionally be compressed or hashed. Add the ability to read this information from the flashmap. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 099930e..1a931e8 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -602,10 +602,26 @@ const u8 *fdtdec_locate_byte_array(const void *blob, int node,
int fdtdec_decode_region(const void *blob, int node, const char *prop_name,
fdt_addr_t *basep, fdt_size_t *sizep);
+enum fmap_compress_t {
+ FMAP_COMPRESS_NONE,
+ FMAP_COMPRESS_LZO,
+};
+
+enum fmap_hash_t {
+ FMAP_HASH_NONE,
+ FMAP_HASH_SHA1,
+ FMAP_HASH_SHA256,
+};
+
/* A flash map entry, containing an offset and length */
struct fmap_entry {
uint32_t offset;
uint32_t length;
+ uint32_t used; /* Number of bytes used in region */
+ enum fmap_compress_t compress_algo; /* Compression type */
+ enum fmap_hash_t hash_algo; /* Hash algorithm */
+ const uint8_t *hash; /* Hash value */
+ int hash_size; /* Hash size */
};
/**