diff options
author | Tom Rini <trini@konsulko.com> | 2023-04-14 10:50:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-14 10:50:55 -0400 |
commit | 12c1e5782401abca1a8cff578d1911a9ca7d2e7d (patch) | |
tree | 90cd274dba3b3e0191d63220abd33df99ca078c0 /cmd | |
parent | 75f415b3269891984d4bc87ba411173901763613 (diff) | |
parent | 6add83991b2887619d0b25e4068b4c0082a4596a (diff) | |
download | u-boot-WIP/14Apr2023.zip u-boot-WIP/14Apr2023.tar.gz u-boot-WIP/14Apr2023.tar.bz2 |
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/14Apr2023
- mvebu: Boot support for 4K Native disks (Pali)
- a38x: Perform DDR training sequence again for 2nd boot (Tony)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mvebu/bubt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c index 37ff9c4..ca24a5c 100644 --- a/cmd/mvebu/bubt.c +++ b/cmd/mvebu/bubt.c @@ -924,8 +924,11 @@ static int check_image_header(void) offset = le32_to_cpu(hdr->srcaddr); size = le32_to_cpu(hdr->blocksize); - if (hdr->blockid == 0x78) /* SATA id */ - offset *= 512; + if (hdr->blockid == 0x78) { /* SATA id */ + struct blk_desc *blk_dev = IS_ENABLED(BLK) ? blk_get_devnum_by_uclass_id(UCLASS_SCSI, 0) : NULL; + unsigned long blksz = blk_dev ? blk_dev->blksz : 512; + offset *= blksz; + } if (offset % 4 != 0 || size < 4 || size % 4 != 0) { printf("Error: Bad A38x image blocksize.\n"); |