On Tuesday, June 16, 2015 at 11:19:11 AM, Michal Marek wrote:
> On 2015-06-16 06:01, Stephen Warren wrote:
> > On 06/11/2015 12:35 PM, Jakub Kicinski wrote:
> >> Hello!

Hi/Ahoj :)

> >> I'm using latest git source of U-Boot on Raspberry Pi Compute Module
> >> and performance of fatload is quite bad.  Does anyone have any clue
> >> about what can be wrong?  Is it the lack of cache?
> > 
> >> Sample boot log:
> > ...
> > 
> >> reading zImage
> >> 4003816 bytes read in 48930 ms (79.1 KiB/s)
> > 
> > I see this too. I bisected it to:
> > 33fe2fb8df01 ARM: mmc: bcm283x: Remove get_timer_us() from mmc driver
> > 
> > Marek, this is the second symptom I bisected to this patch. Something
> > seems quite wrong with it. Did changing to the other timer function
> > change the timer tick rate or something? FWIW, "sleep 10" at the shell
> > prompt appears to run for the correct amount of time, so I guess it's
> > not that.

Hmmmm, get_timer() returns msecs, not usecs. I wonder what I was smoking.
Can you try with the attached diff please (I only compile-tested it) ?

> I think you meant Marek VaĊĦut. I'm Marek by last name :).

We're both Czech though ;-)

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
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to