Skip to content

Commit

Permalink
[PATCH] MMC: Fix divdi3 reference in mmci.c
Browse files Browse the repository at this point in the history
Use do_div() instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Jul 1, 2005
1 parent 62351cc commit 7b09cda
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/mmc/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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",
Expand All @@ -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);
Expand Down

0 comments on commit 7b09cda

Please sign in to comment.