[PATCH] MMC: Fix divdi3 reference in mmci.c
Use do_div() instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
62351cc38d
commit
7b09cdac5a
|
@ -20,6 +20,7 @@
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/mmc/protocol.h>
|
#include <linux/mmc/protocol.h>
|
||||||
|
|
||||||
|
#include <asm/div64.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/scatterlist.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)
|
static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
|
||||||
{
|
{
|
||||||
unsigned int datactrl, timeout, irqmask;
|
unsigned int datactrl, timeout, irqmask;
|
||||||
|
unsigned long long clks;
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
|
|
||||||
DBG(host, "blksz %04x blks %04x flags %08x\n",
|
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);
|
mmci_init_sg(host, data);
|
||||||
|
|
||||||
timeout = data->timeout_clks +
|
clks = (unsigned long long)data->timeout_ns * host->cclk;
|
||||||
((unsigned long long)data->timeout_ns * host->cclk) /
|
do_div(clks, 1000000000UL);
|
||||||
1000000000ULL;
|
|
||||||
|
timeout = data->timeout_clks + (unsigned int)clks;
|
||||||
|
|
||||||
base = host->base;
|
base = host->base;
|
||||||
writel(timeout, base + MMCIDATATIMER);
|
writel(timeout, base + MMCIDATATIMER);
|
||||||
|
|
Loading…
Reference in New Issue