Skip to contentSkip to conversation

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

PATCH New Tony Lin 4 participants 5 messages Nov 22, 2011 – Dec 13, 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 in the tasklet.

CC Xiaobo Xie <[email protected]>
CC Anton Vorontsov <[email protected]>
---
 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

Hi,

Quoted 23 lines · Tony Lin

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

CC Xiaobo Xie <[email protected]>
CC Anton Vorontsov <[email protected]>
---
 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;
Quoted 1 line

}

I don't know if 1ms is actually long enough for the clock to stabilize on all boards, but I'll push this change to mmc-next and we can see if we get any regression reports.

Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#2 lore raw

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

Okay
Thanks

Quoted 52 lines

-----Original Message-----
From: linux-mmc-owner at vger.kernel.org [mailto:linux-mmc-
owner at vger.kernel.org] On Behalf Of Chris Ball
Sent: Friday, December 02, 2011 2:11 AM
To: Lin Tony-B19295
Cc: linux-mmc at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Xie Xiaobo-R63061; avorontsov at ru.mvista.com
Subject: Re: [PATCH 1/1] mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

Hi,

Quoted 23 lines · Tony Lin

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

CC Xiaobo Xie <[email protected]>
CC Anton Vorontsov <[email protected]>
---
 drivers/mmc/host/sdhci-esdhc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/mmc/host/sdhci-esdhc.h index c3b08f1..b97b2f5 100644

drivers/mmc/host/sdhci-esdhc.h +1 -1
@@ -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;
Quoted 1 line

}

I don't know if 1ms is actually long enough for the clock to stabilize on all boards, but I'll push this change to mmc-next and we can see if we get any regression reports.

Thanks,

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

#3 lore raw

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

I don't think it make sense to change the delay time.
Which will affect all PowerPC eSDHC controller, could you confirm which can work on all PowerPC platform?

-----Original Message-----
From: [email protected] [mailto:linux-mmc-owner at vger.kernel.org] On Behalf Of Lin Tony-B19295
Sent: Friday, December 02, 2011 1:37 PM
To: Chris Ball
Cc: linux-mmc at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Xie Xiaobo-R63061; avorontsov at ru.mvista.com
Subject: RE: [PATCH 1/1] mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

Okay
Thanks

Quoted 44 lines

-----Original Message-----
From: linux-mmc-owner at vger.kernel.org [mailto:linux-mmc- owner at vger.kernel.org] On Behalf Of Chris Ball
Sent: Friday, December 02, 2011 2:11 AM
To: Lin Tony-B19295
Cc: linux-mmc at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Xie Xiaobo-R63061; avorontsov at ru.mvista.com
Subject: Re: [PATCH 1/1] mmc: sdhci-esdhc: Change delay after setting clock from 100ms to 1ms

Hi,

Quoted 23 lines · Tony Lin

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

CC Xiaobo Xie <[email protected]>
CC Anton Vorontsov <[email protected]>
---
 drivers/mmc/host/sdhci-esdhc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/mmc/host/sdhci-esdhc.h index c3b08f1..b97b2f5 100644

drivers/mmc/host/sdhci-esdhc.h +1 -1
@@ -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;
Quoted 1 line

}

I don't know if 1ms is actually long enough for the clock to stabilize on all boards, but I'll push this change to mmc-next and we can see if we get any regression reports.

Thanks,

Quoted 8 lines

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

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

Hi,

Quoted 3 lines · On Fri, Dec 02 2011, Huang Changming-R66093 wrote:

I don't think it make sense to change the delay time. Which will affect all PowerPC eSDHC controller, could you confirm which can work on all PowerPC platform?

No, of course not, but that's why I said we can put the patch in mmc-next and see if anyone complains; mdelay(100) is clearly broken.

Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child