From: Michael Trimarchi <michael@amarulasolutions.com>
To: Tim Harvery <tharvey@gateworks.com>, Ye Li <ye.li@nxp.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
u-boot@lists.denx.de, Fabio Estevam <festevam@denx.de>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Sean Anderson <sean.anderson@seco.com>
Subject: [RFC PATCH] spl: spl_nand: Fix bad block handling in fitImage
Date: Sat, 23 Apr 2022 10:38:26 +0200 [thread overview]
Message-ID: <20220423083826.31168-1-michael@amarulasolutions.com> (raw)
If the fitImage has some bad block in fit image area, the
offset must be recalulcated. This should be done always.
After implementing it in mxs now is possible to call the function
even for that platform
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
common/spl/spl_nand.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index fc61b447a5..82a10ffa63 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -43,15 +43,12 @@ static ulong spl_nand_fit_read(struct spl_load_info *load, ulong offs,
ulong size, void *dst)
{
int err;
-#ifdef CONFIG_SYS_NAND_BLOCK_SIZE
ulong sector;
sector = *(int *)load->priv;
- offs = sector + nand_spl_adjust_offset(sector, offs - sector);
-#else
offs *= load->bl_len;
size *= load->bl_len;
-#endif
+ offs = sector + nand_spl_adjust_offset(sector, offs - sector);
err = nand_spl_load_image(offs, size, dst);
if (err)
return 0;
--
2.25.1
reply other threads:[~2022-04-23 8:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220423083826.31168-1-michael@amarulasolutions.com \
--to=michael@amarulasolutions.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=festevam@denx.de \
--cc=miquel.raynal@bootlin.com \
--cc=sean.anderson@seco.com \
--cc=tharvey@gateworks.com \
--cc=u-boot@lists.denx.de \
--cc=ye.li@nxp.com \
/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