aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-07-01 07:02:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-07-01 07:02:59 -0400
commit7b09cdac5af1e13ab4b30421ae5c4b7953c26841 (patch)
tree9d84825b1db6166d8963ad40045ffa75ad0e24b5 /drivers/mmc
parent62351cc38d3eaf3de0327054dd6ebc039f4da80d (diff)
[PATCH] MMC: Fix divdi3 reference in mmci.c
Use do_div() instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-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 @@
20#include <linux/mmc/host.h> 20#include <linux/mmc/host.h>
21#include <linux/mmc/protocol.h> 21#include <linux/mmc/protocol.h>
22 22
23#include <asm/div64.h>
23#include <asm/io.h> 24#include <asm/io.h>
24#include <asm/irq.h> 25#include <asm/irq.h>
25#include <asm/scatterlist.h> 26#include <asm/scatterlist.h>
@@ -70,6 +71,7 @@ static void mmci_stop_data(struct mmci_host *host)
70static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) 71static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
71{ 72{
72 unsigned int datactrl, timeout, irqmask; 73 unsigned int datactrl, timeout, irqmask;
74 unsigned long long clks;
73 void __iomem *base; 75 void __iomem *base;
74 76
75 DBG(host, "blksz %04x blks %04x flags %08x\n", 77 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)
81 83
82 mmci_init_sg(host, data); 84 mmci_init_sg(host, data);
83 85
84 timeout = data->timeout_clks + 86 clks = (unsigned long long)data->timeout_ns * host->cclk;
85 ((unsigned long long)data->timeout_ns * host->cclk) / 87 do_div(clks, 1000000000UL);
86 1000000000ULL; 88
89 timeout = data->timeout_clks + (unsigned int)clks;
87 90
88 base = host->base; 91 base = host->base;
89 writel(timeout, base + MMCIDATATIMER); 92 writel(timeout, base + MMCIDATATIMER);