odroid: fix boot issues on u2, xu4 and siblings
v2 cover odroid: fix boot issues on u2, xu4 and siblings
Hi,
Patch 1 fixes issue reported in [1], which happens on odroid-u2 and probably other devices in that family. Re-adding this quirk was discussed already by Jaehoon and Andy in the patch that (re-)introduced this issue [2], but I do not think a patch was sent for it.
Patch 2 fixes issue reported in [3], which happens on odroid-{u2,xu4} and other devices in that family. An alternative fix was sent previously by Joost [4], but has not been picked up yet.
Tested on odroid-u2 and odroid-xu4 on top of master branch, I am able to boot from sdcard on both without issues.
Changes since v1:
Patch 1: none
Patch 2:
* Check return code of uclass_first_device_err instead of guarding it with IS_ENABLED(CONFIG_CROS_EC), suggested by Simon Glass.
[1] https://lists.denx.de/pipermail/u-boot/2023-January/504116.html
[2] https://lists.denx.de/pipermail/u-boot/2021-March/445243.html
[3] https://lists.denx.de/pipermail/u-boot/2023-January/504115.html
[4] https://lists.denx.de/pipermail/u-boot/2023-January/505551.html
Henrik Grimler (2):
Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B"
samsung: common: do not reset if cros-ec uclass is missing
board/samsung/common/board.c | 2 +- drivers/mmc/s5p_sdhci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
base-commit: a5e490f14e904fd240ccec5d364509b36a3150f9
Signature · 1 line
2.30.2
PATCH v2 1/2 Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B"
This reverts commit a034ec06ff1d558bbe11d5ee05edbb4de3ee2215.
Commit 4a3ea75de4c5 ("Revert "mmc: sdhci: set to INT_DATA_END when there are data"") reverted the alternative fix that was added for Exynos 4 devices, causing an error when trying to boot from an sdcard:
<...>
Loading Environment from MMC... sdhci_send_command: Timeout for status update! mmc fail to send stop cmd
<...>
Re-add the quirk to allow booting from sdcards again.
--- drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/s5p_sdhci.c +1 -1
@@ -90,7 +90,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host) host->name =S5P_NAME ; host->quirks =SDHCI_QUIRK_NO_HISPD_BIT |SDHCI_QUIRK_BROKEN_VOLTAGE | -SDHCI_QUIRK_32BIT_DMA_ADDR | +SDHCI_QUIRK_BROKEN_R1B |SDHCI_QUIRK_32BIT_DMA_ADDR |SDHCI_QUIRK_WAIT_SEND_CMD |SDHCI_QUIRK_USE_WIDE8 ; host->max_clk =52000000 ; host->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 |MMC_VDD_165_195 ;
Signature · 1 line
2.30.2
PATCH v2 2/2 samsung: common: do not reset if cros-ec uclass is missing
In reply to Henrik GrimlerOtherwise non-ChromeOS samsung devices, like the odroid boards, are stuck in a bootloop if CONFIG_CROS_EC is not enabled:
<...>
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
cros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...
Issue started after commit e44d7e73fe0d ("dm: core: Switch uclass_*_device_err to use uclass_*_device_check").
--- board/samsung/common/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/samsung/common/board.c +1 -1
@@ -223,7 +223,7 @@ int board_late_init(void)char mmcbootdev_str[16 ]; ret =uclass_first_device_err (UCLASS_CROS_EC , &dev); -if (ret && ret != -ENODEV ) { +if (ret && ret != -ENODEV && ret != -EPFNOSUPPORT ) {/* Force console on */ gd->flags &= ~GD_FLG_SILENT ;
Signature · 1 line
2.30.2
Re: [PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing
Quoted 15 lines · Henrik Grimler
Otherwise non-ChromeOS samsung devices, like the odroid boards, are stuck in a bootloop if
CONFIG_CROS_ECis not enabled:<...>
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environmentcros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...
Quoted 7 lines
Issue started after commit
e44d7e73fe0d("dm: core: Switch uclass_*_device_err to use uclass_*_device_check").Signed-off-by Henrik Grimler <[email protected]>--- board/samsung/common/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Minkyu Kang
Reviewed-byRe: [PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing
Quoted 20 lines · Simon Glass
Quoted 7 lines · Henrik Grimler
Otherwise non-ChromeOS samsung devices, like the odroid boards, are stuck in a bootloop if
CONFIG_CROS_ECis not enabled:<...>
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using defaultenvironment
Quoted 11 lines
cros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...Issue started after commit
e44d7e73fe0d("dm: core: Switch uclass_*_device_err to use uclass_*_device_check").
Quoted 7 lines
Quoted 4 lines
Signed-off-by Henrik Grimler <[email protected]>--- board/samsung/common/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Simon Glass <[email protected]>
Signature · 2 lines
Thanks, Minkyu Kang.