All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: mxs_nand_spl: Remove the page aligned access
@ 2022-03-28  9:14 Ye Li
  2022-03-29 16:03 ` Tim Harvey
  2022-04-12 18:47 ` sbabic
  0 siblings, 2 replies; 3+ messages in thread
From: Ye Li @ 2022-03-28  9:14 UTC (permalink / raw)
  To: sbabic, tharvey, u-boot; +Cc: trini, uboot-imx

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>
---
 drivers/mtd/nand/raw/mxs_nand_spl.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index 9e0b8afb..59a67ee 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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: nand: mxs_nand_spl: Remove the page aligned access
  2022-03-28  9:14 [PATCH] mtd: nand: mxs_nand_spl: Remove the page aligned access Ye Li
@ 2022-03-29 16:03 ` Tim Harvey
  2022-04-12 18:47 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: Tim Harvey @ 2022-03-29 16:03 UTC (permalink / raw)
  To: Ye Li; +Cc: Stefano Babic, u-boot, Tom Rini, dl-uboot-imx

On Mon, Mar 28, 2022 at 2:14 AM Ye Li <ye.li@nxp.com> wrote:
>
> 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>
> ---
>  drivers/mtd/nand/raw/mxs_nand_spl.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
> index 9e0b8afb..59a67ee 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;
> --
> 2.7.4
>

Ye Li,

Tested-by: Tim Harvey <tharvey@gateworks.com> #gw_ventana

Note however that I use UBIFS to store the kernel/dtb's and do not use
a FIT image

Best Regards,

Tim

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] mtd: nand: mxs_nand_spl: Remove the page aligned access
  2022-03-28  9:14 [PATCH] mtd: nand: mxs_nand_spl: Remove the page aligned access Ye Li
  2022-03-29 16:03 ` Tim Harvey
@ 2022-04-12 18:47 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: sbabic @ 2022-04-12 18:47 UTC (permalink / raw)
  To: Ye Li, u-boot

> 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
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-12 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  9:14 [PATCH] mtd: nand: mxs_nand_spl: Remove the page aligned access Ye Li
2022-03-29 16:03 ` Tim Harvey
2022-04-12 18:47 ` sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.