ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* Increasing stabilization time in sunxi_mmc_core_init
@ 2022-07-21 11:03 Da Xue
  2022-07-21 11:28 ` Andre Przywara
  0 siblings, 1 reply; 10+ messages in thread
From: Da Xue @ 2022-07-21 11:03 UTC (permalink / raw)
  To: linux-sunxi; +Cc: u-boot

Hi,

Users were reporting non-boot on our H5 boards (ALL-H3-CC-H5). u-boot
gets stuck in SPL with this message for SD/eMMC respectively.

Trying to boot from MMC1 or Trying to boot from MMC2

I tested about 20 MicroSD cards from different brands and some were
happy and some were not. Increasing the udelay to 8-10ms in
drivers/mmc/sunxi_mmc.c sunxi_mmc_core_init after reset seems to fix
the issue for the MicroSD cards.

Author: Da Xue <da@libre.computer>
Date:   Wed Jul 20 19:11:55 2022 -0400

    sunxi: raise stabilization time for mmc from 1ms to 8ms

diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 1bb7b6d0e9..499e057725 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -297,7 +297,7 @@ static int sunxi_mmc_core_init(struct mmc *mmc)

        /* Reset controller */
        writel(SUNXI_MMC_GCTRL_RESET, &priv->reg->gctrl);
-       udelay(1000);
+       udelay(8000);

        return 0;
 }

I don't know the implications of this change so I am seeking feedback.
Are other boards having this issue as well or is it specific to our
hardware?

Best,
Da

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

end of thread, other threads:[~2022-07-21 21:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 11:03 Increasing stabilization time in sunxi_mmc_core_init Da Xue
2022-07-21 11:28 ` Andre Przywara
2022-07-21 15:14   ` Jernej Škrabec
2022-07-21 19:56     ` Da Xue
2022-07-21 20:05       ` Jernej Škrabec
2022-07-21 20:33         ` Da Xue
2022-07-21 20:49           ` Jernej Škrabec
2022-07-21 20:58             ` Da Xue
2022-07-21 21:23               ` Da Xue
2022-07-21 21:30                 ` Jernej Škrabec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox