mtd: nand: mxs_nand_spl: Remove the page aligned access
Subsystems (3)
PATCH 1/1 mtd: nand: mxs_nand_spl: Remove the page aligned access
The mxs_nand_spl driver can support to read from page unaligned offset, so don't need to set bl_len to ask spl_load_simple_fit to handle the page unaligned access.
Actually spl_load_simple_fit has two parts of reading:spl_simple_fit_read and spl_load_fit_image.
The spl_load_fit_image can handle the page unaligned offset, but the spl_simple_fit_read can't do it. spl_simple_fit_read requires the FIT location at page aligned offset.
Hence, remove the nand_get_mtd overwrite function from mxs_nand_spl to use page unaligned read by driver.
--- drivers/mtd/nand/raw/mxs_nand_spl.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/mtd/nand/raw/mxs_nand_spl.c +0 -5
@@ -283,11 +283,6 @@ 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 ;
Signature · 1 line
2.7.4
Quoted 36 lines · Ye Li
The
mxs_nand_spldriver can support to read from page unaligned offset, so don't need to setbl_lento askspl_load_simple_fitto handle the page unaligned access.Actually
spl_load_simple_fithas two parts of reading:spl_simple_fit_readandspl_load_fit_image.
Thespl_load_fit_imagecan handle the page unaligned offset, but thespl_simple_fit_readcan't do it.spl_simple_fit_readrequires the FIT location at page aligned offset.Hence, remove the
nand_get_mtdoverwrite function frommxs_nand_splto use page unaligned read by driver.Signed-off-by Ye Li <[email protected]>--- drivers/mtd/nand/raw/mxs_nand_spl.c | 5 ----- 1 file changed, 5 deletions(-)drivers/mtd/nand/raw/mxs_nand_spl.c +0
-6@@ -283,11 +283,6 @@ 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 ; --
Quoted 2 lines
2.7.4
Ye Li,
Note however that I use UBIFS to store the kernel/dtb's and do not use a FIT image
Best Regards,
Tim
PATCH 1/1 mtd: nand: mxs_nand_spl: Remove the page aligned access
In reply to Ye LiQuoted 10 lines
The
mxs_nand_spldriver can support to read from page unaligned offset, so don't need to setbl_lento askspl_load_simple_fitto handle the page unaligned access.
Actuallyspl_load_simple_fithas two parts of reading:spl_simple_fit_readandspl_load_fit_image.
Thespl_load_fit_imagecan handle the page unaligned offset, but thespl_simple_fit_readcan't do it.spl_simple_fit_readrequires the FIT location at page aligned offset.
Hence, remove thenand_get_mtdoverwrite function frommxs_nand_splto use page unaligned read by driver.
Quoted 2 lines
Signed-off-by Ye Li <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================