diff options
author | Tim Harvey <tharvey@gateworks.com> | 2021-03-01 14:33:28 -0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2021-04-08 20:29:53 +0200 |
commit | aa0032f67267232c6b315b5f6e1c086c217c9aae (patch) | |
tree | 19ae1e070b0bb31741cc8122bf54061889ba0ca2 /drivers/mtd/nand | |
parent | 39cb85043cdbc98d10b49f0b86596043d5f8e3f8 (diff) | |
download | u-boot-aa0032f67267232c6b315b5f6e1c086c217c9aae.tar.gz |
spl: fit: nand: allow for non-page-aligned elements
Add a weak nand_get_mtd function for nand drivers to provide mtd info
and use this to set pagesize such that reading of non page-aligned
elements can succeed.
The spl_load_simple_fit already handles block block access so all we
need to do is provide the nand writesize as the block length.
Further cleanup of the drivers which use nand_spl_loaders.c such as
am335x_spl_bch.c, atmel_nand.c, and nand_spl_simple.c could be done
using info from mtd_info instead of statically defined details.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/raw/mxs_nand_spl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c index 46dc29df36..17f46ae5e9 100644 --- a/drivers/mtd/nand/raw/mxs_nand_spl.c +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c @@ -282,6 +282,11 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *buf) return 0; } +struct mtd_info *nand_get_mtd(void) +{ + return mtd; +} + int nand_default_bbt(struct mtd_info *mtd) { return 0; |