mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
tools: kwboot: Fix parsing SDIO kwbimage
Despite the official specification, Marvell BootROM does not interpret
srcaddr from SDIO image as offset in number of sectors (like for SATA
image), but as offset in bytes (like for all other images except SATA).
To parse SDIO kwbimage in the same way as Marvell BootROM, it is needed to
interpret srcaddr in bytes. This change fixes loading of SDIO images via
kwboot over UART.
Fixes: 792e423550
("tools: kwboot: Patch source address in image header")
Signed-off-by: Pali Rohár <pali@kernel.org>
This commit is contained in:
parent
14b866e6d6
commit
8562a1c6a4
1 changed files with 0 additions and 4 deletions
|
@ -1894,10 +1894,6 @@ kwboot_img_patch(void *img, size_t *size, int baudrate)
|
|||
hdr->srcaddr = cpu_to_le32((srcaddr - 1) * 512);
|
||||
break;
|
||||
|
||||
case IBR_HDR_SDIO_ID:
|
||||
hdr->srcaddr = cpu_to_le32(srcaddr * 512);
|
||||
break;
|
||||
|
||||
case IBR_HDR_PEX_ID:
|
||||
if (srcaddr == 0xFFFFFFFF)
|
||||
hdr->srcaddr = cpu_to_le32(hdrsz);
|
||||
|
|
Loading…
Reference in a new issue