diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-07-04 14:14:42 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-07-04 14:14:42 +0100 |
commit | 07929dcb963786512c760dd3ecd148d89295e7e5 (patch) | |
tree | f5db01392ebb968b4c8acb5a6b3b03a833bfcb02 /drivers/mmc/mmci.c | |
parent | c2d9b8387bce8b4a0fd402fab7dc1319d11a418d (diff) | |
parent | 19f7241a3b087bbf4dd107c979608fdb56c83a09 (diff) | |
download | kernel_samsung_aries-07929dcb963786512c760dd3ecd148d89295e7e5.zip kernel_samsung_aries-07929dcb963786512c760dd3ecd148d89295e7e5.tar.gz kernel_samsung_aries-07929dcb963786512c760dd3ecd148d89295e7e5.tar.bz2 |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'drivers/mmc/mmci.c')
-rw-r--r-- | drivers/mmc/mmci.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 3a5f6ac..7a42966 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); |