summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-02 10:39:09 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-02 10:39:09 -0700
commit1d6bebf2ecf92924492c491d9c3a72edba95f907 (patch)
tree899c6b12c76103bb6c6e83ae71ed0e0165552c95 /drivers/mmc/mmci.c
parent86166f9846590fa46f8e24e9346d002e938a8b81 (diff)
parent3eee0d03e33b0294eb3165c96f213a8c8ee461a8 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
Diffstat (limited to 'drivers/mmc/mmci.c')
-rw-r--r--drivers/mmc/mmci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
index 3a5f6ac5b364..7a42966d755b 100644
--- a/drivers/mmc/mmci.c
+++ b/drivers/mmc/mmci.c
@@ -20,6 +20,7 @@
#include <linux/mmc/host.h>
#include <linux/mmc/protocol.h>
+#include <asm/div64.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/scatterlist.h>
@@ -70,6 +71,7 @@ static void mmci_stop_data(struct mmci_host *host)
static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
{
unsigned int datactrl, timeout, irqmask;
+ unsigned long long clks;
void __iomem *base;
DBG(host, "blksz %04x blks %04x flags %08x\n",
@@ -81,9 +83,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
mmci_init_sg(host, data);
- timeout = data->timeout_clks +
- ((unsigned long long)data->timeout_ns * host->cclk) /
- 1000000000ULL;
+ clks = (unsigned long long)data->timeout_ns * host->cclk;
+ do_div(clks, 1000000000UL);
+
+ timeout = data->timeout_clks + (unsigned int)clks;
base = host->base;
writel(timeout, base + MMCIDATATIMER);