diff options
author | Roman Shaposhnikov <x0166637@ti.com> | 2012-06-13 23:00:26 +0300 |
---|---|---|
committer | Roman Shaposhnikov <x0166637@ti.com> | 2012-06-13 23:00:26 +0300 |
commit | 4efa29b240cc7dd0584ad3d2f6a446e6034e0a78 (patch) | |
tree | 741e8a369da867cd29c112a5f9fc4dfe596b67cd /drivers/mmc/host | |
parent | 0f2c8a7c9c04e388f585a79a7e609d8427e68e08 (diff) | |
download | kernel_samsung_espresso10-4efa29b240cc7dd0584ad3d2f6a446e6034e0a78.zip kernel_samsung_espresso10-4efa29b240cc7dd0584ad3d2f6a446e6034e0a78.tar.gz kernel_samsung_espresso10-4efa29b240cc7dd0584ad3d2f6a446e6034e0a78.tar.bz2 |
Merge latest changes from google kernel/common.git
Kernel version updated to 3.0.31
Change-Id: Ifbd7150801f3beeec9cbaa566f249d8019ef9348
Signed-off-by: Roman Shaposhnikov <x0166637@ti.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 9 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 8 |
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index aa8039f..b6cd386 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -468,7 +468,14 @@ err: static inline unsigned int ns_to_clocks(struct atmel_mci *host, unsigned int ns) { - return (ns * (host->bus_hz / 1000000) + 999) / 1000; + /* + * It is easier here to use us instead of ns for the timeout, + * it prevents from overflows during calculation. + */ + unsigned int us = DIV_ROUND_UP(ns, 1000); + + /* Maximum clock frequency is host->bus_hz/2 */ + return us * (DIV_ROUND_UP(host->bus_hz, 2000000)); } static void atmci_set_timeout(struct atmel_mci *host, diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index ba31abe..6fe8ced 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -139,8 +139,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) imx_data->scratchpad = val; return; case SDHCI_COMMAND: - if ((host->cmd->opcode == MMC_STOP_TRANSMISSION) - && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) + if ((host->cmd->opcode == MMC_STOP_TRANSMISSION || + host->cmd->opcode == MMC_SET_BLOCK_COUNT) && + (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) val |= SDHCI_CMD_ABORTCMD; writel(val << 16 | imx_data->scratchpad, host->ioaddr + SDHCI_TRANSFER_MODE); @@ -244,8 +245,7 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd } pltfm_host->priv = imx_data; - if (!cpu_is_mx25()) - host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; + host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; if (cpu_is_mx25() || cpu_is_mx35()) { /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */ |