All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior
@ 2015-06-19 21:39 Marek Vasut
  2015-06-19 21:41 ` Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Marek Vasut @ 2015-06-19 21:39 UTC (permalink / raw)
  To: u-boot

Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
"mmc: bcm283x: Remove get_timer_us() from mmc driver"
incorrectly replaced ad-hoc get_timer_us() function
with a plain get_timer(). The get_timer() operates in
mSec units instead of uSec though, which caused very
slow operation of the driver.

Restore the original behavior of the driver, but avoid
get_timer_us() and use timer_get_us() instead. The later
is part of the standard API.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jakub Kici?ski <moorray3@wp.pl>
Cc: Stephen Warren <swarren@wwwdotorg.org>
---
 drivers/mmc/bcm2835_sdhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 078ef05..227d2df 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)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior
  2015-06-19 21:39 [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior Marek Vasut
@ 2015-06-19 21:41 ` Marek Vasut
  2015-06-20 11:36 ` Jakub Kiciński
  2015-06-26 21:04 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2015-06-19 21:41 UTC (permalink / raw)
  To: u-boot

On Friday, June 19, 2015 at 11:39:41 PM, Marek Vasut wrote:
> Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
> "mmc: bcm283x: Remove get_timer_us() from mmc driver"
> incorrectly replaced ad-hoc get_timer_us() function
> with a plain get_timer(). The get_timer() operates in
> mSec units instead of uSec though, which caused very
> slow operation of the driver.
> 
> Restore the original behavior of the driver, but avoid
> get_timer_us() and use timer_get_us() instead. The later
> is part of the standard API.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Jakub Kici?ski <moorray3@wp.pl>
> Cc: Stephen Warren <swarren@wwwdotorg.org>

Stephen/Jakub, can you please test this one one more time ?
If it works, it'd be nice if this could be applied to current
relase please.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior
  2015-06-19 21:39 [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior Marek Vasut
  2015-06-19 21:41 ` Marek Vasut
@ 2015-06-20 11:36 ` Jakub Kiciński
  2015-06-20 14:23   ` Marek Vasut
  2015-06-26 21:04 ` [U-Boot] " Tom Rini
  2 siblings, 1 reply; 5+ messages in thread
From: Jakub Kiciński @ 2015-06-20 11:36 UTC (permalink / raw)
  To: u-boot

On Fri, 19 Jun 2015 23:39:41 +0200, Marek Vasut wrote:
> Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
> "mmc: bcm283x: Remove get_timer_us() from mmc driver"
> incorrectly replaced ad-hoc get_timer_us() function
> with a plain get_timer(). The get_timer() operates in
> mSec units instead of uSec though, which caused very
> slow operation of the driver.
> 
> Restore the original behavior of the driver, but avoid
> get_timer_us() and use timer_get_us() instead. The later
> is part of the standard API.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Jakub Kici?ski <moorray3@wp.pl>
> Cc: Stephen Warren <swarren@wwwdotorg.org>

Tested-by: Jakub Kicinski <kubakici@wp.pl>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior
  2015-06-20 11:36 ` Jakub Kiciński
@ 2015-06-20 14:23   ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2015-06-20 14:23 UTC (permalink / raw)
  To: u-boot

On Saturday, June 20, 2015 at 01:36:58 PM, Jakub Kici?ski wrote:
> On Fri, 19 Jun 2015 23:39:41 +0200, Marek Vasut wrote:
> > Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
> > "mmc: bcm283x: Remove get_timer_us() from mmc driver"
> > incorrectly replaced ad-hoc get_timer_us() function
> > with a plain get_timer(). The get_timer() operates in
> > mSec units instead of uSec though, which caused very
> > slow operation of the driver.
> > 
> > Restore the original behavior of the driver, but avoid
> > get_timer_us() and use timer_get_us() instead. The later
> > is part of the standard API.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Jakub Kici?ski <moorray3@wp.pl>
> > Cc: Stephen Warren <swarren@wwwdotorg.org>
> 
> Tested-by: Jakub Kicinski <kubakici@wp.pl>

Thanks :)

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] mmc: bcm2835_sdhci: Restore original delay behavior
  2015-06-19 21:39 [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior Marek Vasut
  2015-06-19 21:41 ` Marek Vasut
  2015-06-20 11:36 ` Jakub Kiciński
@ 2015-06-26 21:04 ` Tom Rini
  2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2015-06-26 21:04 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 19, 2015 at 11:39:41PM +0200, Marek Vasut wrote:

> Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
> "mmc: bcm283x: Remove get_timer_us() from mmc driver"
> incorrectly replaced ad-hoc get_timer_us() function
> with a plain get_timer(). The get_timer() operates in
> mSec units instead of uSec though, which caused very
> slow operation of the driver.
> 
> Restore the original behavior of the driver, but avoid
> get_timer_us() and use timer_get_us() instead. The later
> is part of the standard API.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Jakub Kici?ski <moorray3@wp.pl>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Tested-by: Jakub Kicinski <kubakici@wp.pl>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150626/d6bd4256/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-26 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 21:39 [U-Boot] [PATCH] mmc: bcm2835_sdhci: Restore original delay behavior Marek Vasut
2015-06-19 21:41 ` Marek Vasut
2015-06-20 11:36 ` Jakub Kiciński
2015-06-20 14:23   ` Marek Vasut
2015-06-26 21:04 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.