All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH v2 0/2] odroid: fix boot issues on u2, xu4 and siblings
@ 2023-05-09 19:05 Henrik Grimler
  2023-05-09 19:05 ` [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B" Henrik Grimler
  2023-05-09 19:05 ` [RESEND PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing Henrik Grimler
  0 siblings, 2 replies; 6+ messages in thread
From: Henrik Grimler @ 2023-05-09 19:05 UTC (permalink / raw)
  To: joost, jh80.chung, peng.fan, mk7.kang, andy.wu, sjg,
	m.szyprowski, u-boot, ~postmarketos/upstreaming
  Cc: Henrik Grimler

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
-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B"
  2023-05-09 19:05 [RESEND PATCH v2 0/2] odroid: fix boot issues on u2, xu4 and siblings Henrik Grimler
@ 2023-05-09 19:05 ` Henrik Grimler
  2023-05-12  8:07   ` Minkyu Kang
  2023-05-16 15:19   ` Tom Rini
  2023-05-09 19:05 ` [RESEND PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing Henrik Grimler
  1 sibling, 2 replies; 6+ messages in thread
From: Henrik Grimler @ 2023-05-09 19:05 UTC (permalink / raw)
  To: joost, jh80.chung, peng.fan, mk7.kang, andy.wu, sjg,
	m.szyprowski, u-boot, ~postmarketos/upstreaming
  Cc: Henrik Grimler

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RESEND PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing
  2023-05-09 19:05 [RESEND PATCH v2 0/2] odroid: fix boot issues on u2, xu4 and siblings Henrik Grimler
  2023-05-09 19:05 ` [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B" Henrik Grimler
@ 2023-05-09 19:05 ` Henrik Grimler
  2023-05-16 15:19   ` Tom Rini
  1 sibling, 1 reply; 6+ messages in thread
From: Henrik Grimler @ 2023-05-09 19:05 UTC (permalink / raw)
  To: joost, jh80.chung, peng.fan, mk7.kang, andy.wu, sjg,
	m.szyprowski, u-boot, ~postmarketos/upstreaming
  Cc: Henrik Grimler

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;
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B"
  2023-05-09 19:05 ` [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B" Henrik Grimler
@ 2023-05-12  8:07   ` Minkyu Kang
  2023-05-16 15:19   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Minkyu Kang @ 2023-05-12  8:07 UTC (permalink / raw)
  To: Henrik Grimler
  Cc: joost, jh80.chung, peng.fan, mk7.kang, andy.wu, sjg,
	m.szyprowski, u-boot, ~postmarketos/upstreaming

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?

-- 
Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B"
  2023-05-09 19:05 ` [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B" Henrik Grimler
  2023-05-12  8:07   ` Minkyu Kang
@ 2023-05-16 15:19   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2023-05-16 15:19 UTC (permalink / raw)
  To: Henrik Grimler
  Cc: joost, jh80.chung, peng.fan, mk7.kang, andy.wu, sjg,
	m.szyprowski, u-boot, ~postmarketos/upstreaming

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

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!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RESEND PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing
  2023-05-09 19:05 ` [RESEND PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing Henrik Grimler
@ 2023-05-16 15:19   ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2023-05-16 15:19 UTC (permalink / raw)
  To: Henrik Grimler
  Cc: joost, jh80.chung, peng.fan, mk7.kang, andy.wu, sjg,
	m.szyprowski, u-boot, ~postmarketos/upstreaming

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

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!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-16 15:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 19:05 [RESEND PATCH v2 0/2] odroid: fix boot issues on u2, xu4 and siblings Henrik Grimler
2023-05-09 19:05 ` [RESEND PATCH v2 1/2] Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B" Henrik Grimler
2023-05-12  8:07   ` Minkyu Kang
2023-05-16 15:19   ` Tom Rini
2023-05-09 19:05 ` [RESEND PATCH v2 2/2] samsung: common: do not reset if cros-ec uclass is missing Henrik Grimler
2023-05-16 15:19   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.