mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLY
This fixes the header offset calculation.
This issue was found on uniphier v7 SoCs with SPL.
Fixes: 06377c5a1f
("spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoard")
Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221209114021.3074978-1-okamura.dai@socionext.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
This commit is contained in:
parent
17c2ccde22
commit
fda2253d12
1 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ int spl_load_legacy_img(struct spl_image_info *spl_image,
|
|||
* is set
|
||||
*/
|
||||
if (spl_image->flags & SPL_COPY_PAYLOAD_ONLY)
|
||||
dataptr += sizeof(hdr);
|
||||
dataptr += sizeof(*hdr);
|
||||
|
||||
load->read(load, dataptr, spl_image->size,
|
||||
(void *)(unsigned long)spl_image->load_addr);
|
||||
|
@ -116,7 +116,7 @@ int spl_load_legacy_img(struct spl_image_info *spl_image,
|
|||
lzma_len = LZMA_LEN;
|
||||
|
||||
/* dataptr points to compressed payload */
|
||||
dataptr = offset + sizeof(hdr);
|
||||
dataptr = offset + sizeof(*hdr);
|
||||
|
||||
debug("LZMA: Decompressing %08lx to %08lx\n",
|
||||
dataptr, spl_image->load_addr);
|
||||
|
|
Loading…
Reference in a new issue