From d8667412a8b7e1ad96979bc2191b4e3fa90c8254 Mon Sep 17 00:00:00 2001 From: Fred Fan Date: Thu, 19 Nov 2009 16:43:08 +0800 Subject: ENGR00118978: Timer adjustment for all platforms In current u-boot design, get_timer_masked is not correct and udelay is not accurate when the time is less than 1000us. Thus we need to use ipg clock source for accurate timer. Signed-off-by: Terry Lv --- drivers/mmc/imx_esdhc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mmc/imx_esdhc.c b/drivers/mmc/imx_esdhc.c index 6181fca..5ee0efd 100644 --- a/drivers/mmc/imx_esdhc.c +++ b/drivers/mmc/imx_esdhc.c @@ -76,15 +76,15 @@ struct fsl_esdhc { static inline void mdelay(unsigned long msec) { unsigned long i; - for (i = 0; i < msec * 10; i++) - udelay(100); + for (i = 0; i < msec; i++) + udelay(1000); } static inline void sdelay(unsigned long sec) { unsigned long i; - for (i = 0; i < sec * 10; i++) - mdelay(100); + for (i = 0; i < sec; i++) + mdelay(1000); } /* Return the XFERTYP flags for a given command and data packet */ -- cgit v1.1