diff options
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 21 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 7 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 5 |
3 files changed, 17 insertions, 16 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 6985cdb0bb26..e4449a54ae8f 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -1948,12 +1948,12 @@ static bool atmci_filter(struct dma_chan *chan, void *slave) | |||
1948 | } | 1948 | } |
1949 | } | 1949 | } |
1950 | 1950 | ||
1951 | static void atmci_configure_dma(struct atmel_mci *host) | 1951 | static bool atmci_configure_dma(struct atmel_mci *host) |
1952 | { | 1952 | { |
1953 | struct mci_platform_data *pdata; | 1953 | struct mci_platform_data *pdata; |
1954 | 1954 | ||
1955 | if (host == NULL) | 1955 | if (host == NULL) |
1956 | return; | 1956 | return false; |
1957 | 1957 | ||
1958 | pdata = host->pdev->dev.platform_data; | 1958 | pdata = host->pdev->dev.platform_data; |
1959 | 1959 | ||
@@ -1970,12 +1970,15 @@ static void atmci_configure_dma(struct atmel_mci *host) | |||
1970 | host->dma.chan = | 1970 | host->dma.chan = |
1971 | dma_request_channel(mask, atmci_filter, pdata->dma_slave); | 1971 | dma_request_channel(mask, atmci_filter, pdata->dma_slave); |
1972 | } | 1972 | } |
1973 | if (!host->dma.chan) | 1973 | if (!host->dma.chan) { |
1974 | dev_notice(&host->pdev->dev, "DMA not available, using PIO\n"); | 1974 | dev_warn(&host->pdev->dev, "no DMA channel available\n"); |
1975 | else | 1975 | return false; |
1976 | } else { | ||
1976 | dev_info(&host->pdev->dev, | 1977 | dev_info(&host->pdev->dev, |
1977 | "Using %s for DMA transfers\n", | 1978 | "Using %s for DMA transfers\n", |
1978 | dma_chan_name(host->dma.chan)); | 1979 | dma_chan_name(host->dma.chan)); |
1980 | return true; | ||
1981 | } | ||
1979 | } | 1982 | } |
1980 | 1983 | ||
1981 | static inline unsigned int atmci_get_version(struct atmel_mci *host) | 1984 | static inline unsigned int atmci_get_version(struct atmel_mci *host) |
@@ -2085,8 +2088,7 @@ static int __init atmci_probe(struct platform_device *pdev) | |||
2085 | 2088 | ||
2086 | /* Get MCI capabilities and set operations according to it */ | 2089 | /* Get MCI capabilities and set operations according to it */ |
2087 | atmci_get_cap(host); | 2090 | atmci_get_cap(host); |
2088 | if (host->caps.has_dma) { | 2091 | if (host->caps.has_dma && atmci_configure_dma(host)) { |
2089 | dev_info(&pdev->dev, "using DMA\n"); | ||
2090 | host->prepare_data = &atmci_prepare_data_dma; | 2092 | host->prepare_data = &atmci_prepare_data_dma; |
2091 | host->submit_data = &atmci_submit_data_dma; | 2093 | host->submit_data = &atmci_submit_data_dma; |
2092 | host->stop_transfer = &atmci_stop_transfer_dma; | 2094 | host->stop_transfer = &atmci_stop_transfer_dma; |
@@ -2096,15 +2098,12 @@ static int __init atmci_probe(struct platform_device *pdev) | |||
2096 | host->submit_data = &atmci_submit_data_pdc; | 2098 | host->submit_data = &atmci_submit_data_pdc; |
2097 | host->stop_transfer = &atmci_stop_transfer_pdc; | 2099 | host->stop_transfer = &atmci_stop_transfer_pdc; |
2098 | } else { | 2100 | } else { |
2099 | dev_info(&pdev->dev, "no DMA, no PDC\n"); | 2101 | dev_info(&pdev->dev, "using PIO\n"); |
2100 | host->prepare_data = &atmci_prepare_data; | 2102 | host->prepare_data = &atmci_prepare_data; |
2101 | host->submit_data = &atmci_submit_data; | 2103 | host->submit_data = &atmci_submit_data; |
2102 | host->stop_transfer = &atmci_stop_transfer; | 2104 | host->stop_transfer = &atmci_stop_transfer; |
2103 | } | 2105 | } |
2104 | 2106 | ||
2105 | if (host->caps.has_dma) | ||
2106 | atmci_configure_dma(host); | ||
2107 | |||
2108 | platform_set_drvdata(pdev, host); | 2107 | platform_set_drvdata(pdev, host); |
2109 | 2108 | ||
2110 | /* We need at least one slot to succeed */ | 2109 | /* We need at least one slot to succeed */ |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 304f2f98b680..bdfd05517dd5 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1271,12 +1271,13 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
1271 | /* | 1271 | /* |
1272 | * Block size can be up to 2048 bytes, but must be a power of two. | 1272 | * Block size can be up to 2048 bytes, but must be a power of two. |
1273 | */ | 1273 | */ |
1274 | mmc->max_blk_size = 2048; | 1274 | mmc->max_blk_size = 1 << 11; |
1275 | 1275 | ||
1276 | /* | 1276 | /* |
1277 | * No limit on the number of blocks transferred. | 1277 | * Limit the number of blocks transferred so that we don't overflow |
1278 | * the maximum request size. | ||
1278 | */ | 1279 | */ |
1279 | mmc->max_blk_count = mmc->max_req_size; | 1280 | mmc->max_blk_count = mmc->max_req_size >> 11; |
1280 | 1281 | ||
1281 | spin_lock_init(&host->lock); | 1282 | spin_lock_init(&host->lock); |
1282 | 1283 | ||
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d601e41af282..0be4e2013632 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
@@ -269,8 +269,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) | |||
269 | imx_data->scratchpad = val; | 269 | imx_data->scratchpad = val; |
270 | return; | 270 | return; |
271 | case SDHCI_COMMAND: | 271 | case SDHCI_COMMAND: |
272 | if ((host->cmd->opcode == MMC_STOP_TRANSMISSION) | 272 | if ((host->cmd->opcode == MMC_STOP_TRANSMISSION || |
273 | && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) | 273 | host->cmd->opcode == MMC_SET_BLOCK_COUNT) && |
274 | (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) | ||
274 | val |= SDHCI_CMD_ABORTCMD; | 275 | val |= SDHCI_CMD_ABORTCMD; |
275 | 276 | ||
276 | if (is_imx6q_usdhc(imx_data)) { | 277 | if (is_imx6q_usdhc(imx_data)) { |