Skip to contentSkip to conversation

mmc: bcm2835_sdhci: Restore original delay behavior

PATCH In review Marek Vasut 3 participants 5 messages Jun 19, 2015 – Jun 26, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: bcm2835_sdhci: Restore original delay behavior

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.

Cc Jakub Kici?ski <[email protected]>
Cc Stephen Warren <[email protected]>
---
 drivers/mmc/bcm2835_sdhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/bcm2835_sdhci.c +2 -2
index 078ef05..227d2df 100644
@@ -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)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 mmc: bcm2835_sdhci: Restore original delay behavior

Quoted 7 lines · Marek Vasut

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.

Quoted 7 lines

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.

Cc Jakub Kici?ski <[email protected]>
Cc Stephen Warren <[email protected]>

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

#2 lore raw

PATCH 1/1 mmc: bcm2835_sdhci: Restore original delay behavior

In reply to Marek Vasut
Quoted 7 lines · Marek Vasut

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.

Quoted 7 lines

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.

Cc Jakub Kici?ski <[email protected]>
Cc Stephen Warren <[email protected]>
#3 lore raw

PATCH 1/1 mmc: bcm2835_sdhci: Restore original delay behavior

Quoted 12 lines · Jakub Kici?ski
Quoted 11 lines · Marek Vasut

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.

Quoted 5 lines
Quoted 3 lines
Cc Jakub Kici?ski <[email protected]>
Cc Stephen Warren <[email protected]>

Thanks :)

Best regards,
Marek Vasut

#4 lore raw
In reply to Marek Vasut
Quoted 7 lines · Marek Vasut

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.

Quoted 8 lines

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
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>