diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2023-05-06 17:41:11 +0000 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2023-05-18 08:34:45 +0800 |
commit | 3b804b370dd8027a6d450c447247855a149ea2ec (patch) | |
tree | af9959ee5ee6f83c8e1c89dcea853439114c4eb1 /arch/arm | |
parent | 41fc80b8da9664835bdce2beed7882fcdaa0a48c (diff) |
mmc: rockchip_sdhci: Disable DMA mode using a device tree property
Loading part of TF-A into SRAM from eMMC using DMA fails on RK3399
similar to other Rockchip SoCs. Checksum validation fails with:
## Checking hash(es) for Image atf-2 ... sha256 error!
Bad hash value for 'hash' hash node in 'atf-2' image node
spl_load_simple_fit: can't load image loadables index 1 (ret = -1)
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
Add a device tree property, u-boot,spl-fifo-mode, to control when the
rockchip_sdhci driver should disable the use of DMA and fallback on PIO
mode. Same device tree property is used by the rockchip_dw_mmc driver.
In commit 2cc6cde647e2 ("mmc: rockchip_sdhci: Limit number of blocks
read in a single command") the DMA mode was disabled using a CONFIG
option on RK3588. Revert that and instead disable DMA using the device
tree property for all RK3588 boards, also apply similar workaround for
all RK3399 boards.
Fixes: 2cc6cde647e2 ("mmc: rockchip_sdhci: Limit number of blocks read in a single command")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Quentin Schulz <foss+uboot@0leil.net> # RK3399 Puma, RK3588 Tiger
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/dts/rk3399-u-boot.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/dts/rk3588s-u-boot.dtsi | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index e677ae678da..3423b882c43 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -120,6 +120,7 @@ &sdhci { max-frequency = <200000000>; bootph-all; + u-boot,spl-fifo-mode; }; &sdmmc { diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi index cd7e6cb50ee..922cae3f092 100644 --- a/arch/arm/dts/rk3588s-u-boot.dtsi +++ b/arch/arm/dts/rk3588s-u-boot.dtsi @@ -153,6 +153,7 @@ &sdhci { bootph-pre-ram; + u-boot,spl-fifo-mode; }; &uart2 { |