Skip to contentSkip to conversation

mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

PATCH New Tony Lin 3 participants 3 messages Sep 1, 2011

Subsystems (2)
lore
Share & tools
lore

Tony Lin

author
#0 lore raw

PATCH 1/1 mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

1ms is enough for hardware to change the clock to stable. 100ms is too long.

---
 drivers/mmc/host/sdhci-esdhc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci-esdhc.h +1 -1
index c3b08f1..b97b2f5 100644
@@ -73,7 +73,7 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock)
 		| (div << ESDHC_DIVIDER_SHIFT)
 		| (pre_div << ESDHC_PREDIV_SHIFT));
 	sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
-	mdelay(100);
+	mdelay(1);
 out:
 	host->clock = clock;
 }
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

Quoted 2 lines · Tony Lin

1ms is enough for hardware to change the clock to stable. 100ms is too long.

How do you know that? Can you be sure for PowerPC as well? Have you researched why the original author of the code has chosen that value? If so, please update your commit message with such infos.

Signature · 9 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110901/5ae74122/attachment.sig>
#2 lore raw

PATCH 1/1 mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

Quoted 9 lines

-----Original Message-----
From: Wolfram Sang [mailto:w.sang at pengutronix.de]
Sent: Thursday, September 01, 2011 1:55 PM
To: Lin Tony-B19295
Cc: linux-mmc at vger.kernel.org; linux-arm-kernel at lists.infradead.org; cjb at laptop.org
Subject: Re: [PATCH 1/1] mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

Quoted 8 lines
Quoted 2 lines · Tony Lin

1ms is enough for hardware to change the clock to stable. 100ms is too long.

How do you know that? Can you be sure for PowerPC as well? Have you researched why the original author of the code has chosen that value? If so, please update your commit message with such infos.

I got this confirmation by IC simulation, but sorry I just noticed that's also used for PPC. I can update the information after got confirmation from author.

Quoted 5 lines

--
Pengutronix e.K. | Wolfram Sang
|
Industrial Linux Solutions | http://www.pengutronix.de/
|