diff options
author | Steve Rae <srae@broadcom.com> | 2016-06-07 11:19:38 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-06-27 16:37:39 -0400 |
commit | 2c72404687f1061d042769cc65ef90e6c3da3f96 (patch) | |
tree | 7ccf1a26328276f817dd8c0336ac8b74d911d28b /common/image-sparse.c | |
parent | 9bc34799c8e6d8907b18e02c405576aa6bf9ce15 (diff) | |
download | u-boot-imx-2c72404687f1061d042769cc65ef90e6c3da3f96.zip u-boot-imx-2c72404687f1061d042769cc65ef90e6c3da3f96.tar.gz u-boot-imx-2c72404687f1061d042769cc65ef90e6c3da3f96.tar.bz2 |
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 'common/image-sparse.c')
-rw-r--r-- | common/image-sparse.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/image-sparse.c b/common/image-sparse.c index b36703b..9632c6f 100644 --- a/common/image-sparse.c +++ b/common/image-sparse.c @@ -1,3 +1,4 @@ + /* * Copyright (c) 2009, Google Inc. * All rights reserved. @@ -210,10 +211,8 @@ void write_sparse_image( break; case CHUNK_TYPE_DONT_CARE: -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV - blk += blkcnt; + blk += info->reserve(info, blk, blkcnt); total_blocks += chunk_header->chunk_sz; -#endif break; case CHUNK_TYPE_CRC32: |