From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Wed, 24 Oct 2018 15:56:16 +0200 Subject: [U-Boot] [PATCH] nand: fix up badblock skipping In-Reply-To: <20181019081555.7161-1-jirik.valek@seznam.cz> References: <20181019081555.7161-1-jirik.valek@seznam.cz> Message-ID: <20181024155616.283d703a@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Jiri, Jiri Valek wrote on Fri, 19 Oct 2018 10:15:55 +0200: > From: Jiri Valek >=20 > Currently the badblock skipping fails. SPL loader fails to boot from NAND. > End up on message "SPL: failed to boot from all boot devices" >=20 > Signed-off-by: Jiri Valek > --- >=20 > drivers/mtd/nand/raw/mxs_nand_spl.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/m= xs_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 s= ize, void *buf) > */ > while (is_badblock(mtd, offs, 1)) { > page =3D page + nand_page_per_block; > + offs =3D offs + mtd.erasesize; > /* Check i we've reached the end of flash. */ > if (page >=3D mtd->size >> chip->page_shift) > return -ENOMEM; Reviewed-by: Miquel Raynal Thanks, Miqu=C3=A8l