spl: spl_nand: Fix bad block handling in fitImage
authorMichael Trimarchi <michael@amarulasolutions.com>
Sun, 15 May 2022 09:35:33 +0000 (11:35 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 20 May 2022 10:36:48 +0000 (12:36 +0200)
commitcc980143c01e76ff17004021777c2a65dcde367a
tree9af0b8c51d1dd9c9ef29b83c7350272986a34b57
parent37a7c374a6bd6cefe24516e5aef13d2bab6f133e
spl: spl_nand: Fix bad block handling in fitImage

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.

Cc: Fabio Estevam <festevam@gmail.com>
Tested-By: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
common/spl/spl_nand.c