aboutsummaryrefslogtreecommitdiff
path: root/include/image-sparse.h
diff options
context:
space:
mode:
authorSteve Rae2016-06-07 11:19:38 -0700
committerTom Rini2016-06-27 16:37:39 -0400
commit2c72404687f1061d042769cc65ef90e6c3da3f96 (patch)
tree7ccf1a26328276f817dd8c0336ac8b74d911d28b /include/image-sparse.h
parent9bc34799c8e6d8907b18e02c405576aa6bf9ce15 (diff)
fastboot: sparse: implement reserve()
In order to process the CHUNK_TYPE_DONT_CARE properly, there is a requirement to be able to 'reserve' a specified number of blocks in the storage media. Because of the special handling of "bad blocks" in NAND devices, this is implemented in a storage abstraction function. Signed-off-by: Steve Rae <srae@broadcom.com> Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'include/image-sparse.h')
-rw-r--r--include/image-sparse.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/image-sparse.h b/include/image-sparse.h
index f6869d62c03..b0cc5007f78 100644
--- a/include/image-sparse.h
+++ b/include/image-sparse.h
@@ -19,6 +19,10 @@ struct sparse_storage {
lbaint_t blk,
lbaint_t blkcnt,
const void *buffer);
+
+ lbaint_t (*reserve)(struct sparse_storage *info,
+ lbaint_t blk,
+ lbaint_t blkcnt);
};
static inline int is_sparse_image(void *buf)