summaryrefslogtreecommitdiff
path: root/drivers/mmc/bcm2835_sdhci.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-06-19 23:39:41 +0200
committerTom Rini <trini@konsulko.com>2015-06-25 17:04:37 -0400
commit9f1b4456c9076279a92005acb821e7bd3fc01880 (patch)
tree1e18a5606bb02d1e997ee31ba679fe09e0d81b93 /drivers/mmc/bcm2835_sdhci.c
parent325849ff3d4adeebb8f8f9bc5db950724df9bc21 (diff)
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. 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>
Diffstat (limited to 'drivers/mmc/bcm2835_sdhci.c')
-rw-r--r--drivers/mmc/bcm2835_sdhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 078ef0523a..227d2dfa2e 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)