[RESEND PATCH v2 0/2] 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 no patch was sent.
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].
Tested on odroid-u2 and odroid-xu4 on top of master branch, I am able to boot from sdcard on both without issues.
Changes for v2 resend: * Collect Reviewed-by tags * Rebase against v2023.07-rc2
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: f1d33a44ca04fdca241c1d89fd79e2e56c930c7e

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.
Signed-off-by: Henrik Grimler henrik@grimler.se --- drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index dee84263c3fd..3b74feae68c7 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -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;

Dear Jaehoon
On Wed, 10 May 2023 at 04:07, Henrik Grimler henrik@grimler.se wrote:
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.
Signed-off-by: Henrik Grimler henrik@grimler.se
drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index dee84263c3fd..3b74feae68c7 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -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;
-- 2.30.2
Could you please review?

On Tue, May 09, 2023 at 09:05:46PM +0200, Henrik Grimler wrote:
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.
Signed-off-by: Henrik Grimler henrik@grimler.se
Applied to u-boot/master, thanks!

Otherwise 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").
Signed-off-by: Henrik Grimler henrik@grimler.se Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Minkyu Kang mk7.kang@samsung.com --- board/samsung/common/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 16ce5cb89253..663d7ca991bc 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -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;

On Tue, May 09, 2023 at 09:05:47PM +0200, Henrik Grimler wrote:
Otherwise 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").
Signed-off-by: Henrik Grimler henrik@grimler.se Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Minkyu Kang mk7.kang@samsung.com
Applied to u-boot/master, thanks!
participants (3)
-
Henrik Grimler
-
Minkyu Kang
-
Tom Rini