]> err.no Git - linux-2.6/blobdiff - drivers/mmc/mmci.c
[PATCH] skge: remove SK-9EE support
[linux-2.6] / drivers / mmc / mmci.c
index 3ee961c206bd8dfb5bd209287c4fb9203e73e122..7a42966d755bd00a7defabfe47e8d69fe4820aac 100644 (file)
@@ -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);
@@ -603,7 +606,7 @@ static int mmci_remove(struct amba_device *dev)
 }
 
 #ifdef CONFIG_PM
-static int mmci_suspend(struct amba_device *dev, u32 state)
+static int mmci_suspend(struct amba_device *dev, pm_message_t state)
 {
        struct mmc_host *mmc = amba_get_drvdata(dev);
        int ret = 0;