mirror of
https://xff.cz/git/u-boot/
synced 2025-10-26 16:13:55 +01:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user