diff options
author | Dario Binacchi | 2020-05-27 13:56:20 +0200 |
---|---|---|
committer | Tom Rini | 2020-07-08 17:21:46 -0400 |
commit | 9f6a14c47ff95354185248ea6e7b1c695e64939e (patch) | |
tree | 980cba335253d0a47cdc06246d2f82cc18214ca8 /include | |
parent | 585b468a8c73df0445e994443a39869697fc53a8 (diff) |
spl: fit: nand: fix fit loading in case of bad blocks
The offset at which the image to be loaded from NAND is located is
retrieved from the itb header. The presence of bad blocks in the area
of the NAND where the itb image is located could invalidate the offset
which must therefore be adjusted taking into account the state of the
sectors concerned.
cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/nand.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/nand.h b/include/nand.h index 93cbe1e25db..80dd6469bc0 100644 --- a/include/nand.h +++ b/include/nand.h @@ -120,6 +120,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length, int allexcept); int nand_get_lock_status(struct mtd_info *mtd, loff_t offset); +u32 nand_spl_adjust_offset(u32 sector, u32 offs); int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst); int nand_spl_read_block(int block, int offset, int len, void *dst); void nand_deselect(void); |