summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2024-11-18 12:42:56 +1030
committerTom Rini <trini@konsulko.com>2024-11-25 13:12:19 -0600
commit7327218681d98e8f66624667c6e3b0554502ce6c (patch)
tree5c75fad12fb43d4589a2b20928c2450a1270ae57
parentc0e978b4b7527dc1fe75d0d9c98f7427c19d439c (diff)
ast2600: spl: Use readl for reading mmio
u-boot was crashing in qemu as the modeled hardware enforced overly strict memory reads. While this code will work on existing hardware, fix to avoid future issues. Fixes: 12770d0df0e8 ("ast2600: spl: Add boot mode detection") Link: https://gitlab.com/qemu-project/qemu/-/issues/2636 Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--arch/arm/mach-aspeed/ast2600/spl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-aspeed/ast2600/spl.c b/arch/arm/mach-aspeed/ast2600/spl.c
index 05390c16f3a..0c5a82ed094 100644
--- a/arch/arm/mach-aspeed/ast2600/spl.c
+++ b/arch/arm/mach-aspeed/ast2600/spl.c
@@ -45,10 +45,10 @@ u32 spl_boot_device(void)
}
/* boot from UART has higher priority */
- if (scu->hwstrap2 & SCU_HWSTRAP2_BOOT_UART)
+ if (readl(&scu->hwstrap2) & SCU_HWSTRAP2_BOOT_UART)
return BOOT_DEVICE_UART;
- if (scu->hwstrap1 & SCU_HWSTRAP1_BOOT_EMMC)
+ if (readl(&scu->hwstrap1) & SCU_HWSTRAP1_BOOT_EMMC)
return BOOT_DEVICE_MMC1;
out: