public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nand: fix up badblock skipping
Date: Wed, 24 Oct 2018 15:56:16 +0200	[thread overview]
Message-ID: <20181024155616.283d703a@xps13> (raw)
In-Reply-To: <20181019081555.7161-1-jirik.valek@seznam.cz>

Hi Jiri,

Jiri Valek <jirik.valek@seznam.cz> wrote on Fri, 19 Oct 2018 10:15:55
+0200:

> From: Jiri Valek <valek@2n.cz>
> 
> Currently the badblock skipping fails. SPL loader fails to boot from NAND.
> End up on message "SPL: failed to boot from all boot devices"
> 
> Signed-off-by: Jiri Valek <jirik.valek@seznam.cz>
> ---
> 
>  drivers/mtd/nand/raw/mxs_nand_spl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
> index 2d7bbe83cc..56618c95dc 100644
> --- a/drivers/mtd/nand/raw/mxs_nand_spl.c
> +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
> @@ -239,6 +239,7 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *buf)
>  			 */
>  			while (is_badblock(mtd, offs, 1)) {
>  				page = page + nand_page_per_block;
> +				offs = offs + mtd.erasesize;
>  				/* Check i we've reached the end of flash. */
>  				if (page >= mtd->size >> chip->page_shift)
>  					return -ENOMEM;

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks,
Miquèl

  reply	other threads:[~2018-10-24 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  8:15 [U-Boot] [PATCH] nand: fix up badblock skipping Jiri Valek
2018-10-24 13:56 ` Miquel Raynal [this message]
2018-12-08 16:16   ` Stefano Babic
2019-02-05  9:03     ` [U-Boot] [PATCH v2] " Jiri Valek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181024155616.283d703a@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox