aboutsummaryrefslogtreecommitdiff
path: root/tools/kwboot.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2023-01-08 13:20:20 +0100
committerStefan Roese <sr@denx.de>2023-03-01 06:39:17 +0100
commit8562a1c6a4572550f752d4deca95d9efdd9b5265 (patch)
tree4cdde6d7fe7fe935c3e196b97f744f32ed24b061 /tools/kwboot.c
parent14b866e6d650645881cac041db64f67158ced24e (diff)
downloadu-boot-8562a1c6a4572550f752d4deca95d9efdd9b5265.zip
u-boot-8562a1c6a4572550f752d4deca95d9efdd9b5265.tar.gz
u-boot-8562a1c6a4572550f752d4deca95d9efdd9b5265.tar.bz2
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: 792e42355083 ("tools: kwboot: Patch source address in image header") Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'tools/kwboot.c')
-rw-r--r--tools/kwboot.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c
index da4fe32..188f944 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -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);