[PATCH 2/3] mmc: zynq_sdhci: Change granularity of timeout to 1us
Michal Simek
michal.simek at xilinx.com
Wed Feb 23 15:13:31 CET 2022
From: Ashok Reddy Soma <ashok.reddy.soma at xilinx.com>
The timeout used in 'commit b6f44082d5cd ("mmc: zynq_sdhci: Wait
till sd card detect state is stable")' workaround is 1000ms at a
granularity of 1msec. Change it to 1usec, to not waste time incase the
cd is stable.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
drivers/mmc/zynq_sdhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index f4d69a2f7098..7d62d05eda71 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -770,11 +770,11 @@ static int arasan_sdhci_probe(struct udevice *dev)
* 1000msec till the card detect state gets stable.
*/
if (IS_ENABLED(CONFIG_ARCH_VERSAL)) {
- u32 timeout = 1000;
+ u32 timeout = 1000000;
while (((sdhci_readl(host, SDHCI_PRESENT_STATE) &
SDHCI_CARD_STATE_STABLE) == 0) && timeout) {
- mdelay(1);
+ udelay(1);
timeout--;
}
if (!timeout) {
--
2.35.1
More information about the U-Boot
mailing list