From: Ye Li <ye.li@nxp.com>
Date: Mon, 28 Mar 2022 09:14:07 +0000 (+0800)
Subject: mtd: nand: mxs_nand_spl: Remove the page aligned access
X-Git-Tag: v2025.01-rc5-pxa1908~1458^2~93
X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=34793598c83;p=u-boot.git

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.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Tim Harvey <tharvey@gateworks.com> #gw_ventana
---

diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index 9e0b8afb52..59a67ee414 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -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;