On Tuesday, June 16, 2015 at 05:44:06 AM, Stephen Warren wrote:
> On 05/04/2015 02:54 PM, Marek Vasut wrote:
> > The get_timer_us() function is something which is no longer
> > existing in case we use generic timer framework, so replace
> > it with get_timer().
> 
> Marek,
> 
> This patch causes "saveenv" to got from almost no time to nearly 50s on
> my RPi model A+. Can you take a look at that please?

Can you try the attached diff ? ;-/ I think I mistakenly used get_timer(),
which returns msecs instead of timer_get_us() which reports usecs, sorry.

Best regards,
Marek Vasut
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 078ef05..74b497e 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -69,11 +69,11 @@ static inline void bcm2835_sdhci_raw_writel(struct sdhci_host *host, u32 val,
 	 * (Which is just as well - otherwise we'd have to nobble the DMA engine
 	 * too)
 	 */
-	while (get_timer(bcm_host->last_write) < bcm_host->twoticks_delay)
+	while (timer_get_us() < bcm_host->last_write + bcm_host->twoticks_delay)
 		;
 
 	writel(val, host->ioaddr + reg);
-	bcm_host->last_write = get_timer(0);
+	bcm_host->last_write = timer_get_us();
 }
 
 static inline u32 bcm2835_sdhci_raw_readl(struct sdhci_host *host, int reg)
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to