diff options
author | Vincent Yang <vincent.yang.fujitsu@gmail.com> | 2015-01-20 16:05:17 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-20 09:29:16 +0100 |
commit | d3fc5d71ac4dfd28a66689cfd1eea84c4dba8bde (patch) | |
tree | b37f8c1a3c4341ecc76ef7573b25d77c3cc5c7b9 /drivers/mmc/host/sdhci.c | |
parent | 67d0d04a762db4bd610fd628ad683b5d7dc905e7 (diff) | |
download | blackbird-op-linux-d3fc5d71ac4dfd28a66689cfd1eea84c4dba8bde.tar.gz blackbird-op-linux-d3fc5d71ac4dfd28a66689cfd1eea84c4dba8bde.zip |
mmc: sdhci: add a quirk for single block transactions
This patch defines a quirk to disable the block count
for single block transactions.
It is a preparation and will be used by Fujitsu
SDHCI controller f_sdh30 driver.
Signed-off-by: Vincent Yang <Vincent.Yang@tw.fujitsu.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index a3ecd20e5510..c9881ca131d5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -904,7 +904,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) static void sdhci_set_transfer_mode(struct sdhci_host *host, struct mmc_command *cmd) { - u16 mode; + u16 mode = 0; struct mmc_data *data = cmd->data; if (data == NULL) { @@ -922,9 +922,11 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, WARN_ON(!host->data); - mode = SDHCI_TRNS_BLK_CNT_EN; + if (!(host->quirks2 & SDHCI_QUIRK2_SUPPORT_SINGLE)) + mode = SDHCI_TRNS_BLK_CNT_EN; + if (mmc_op_multi(cmd->opcode) || data->blocks > 1) { - mode |= SDHCI_TRNS_MULTI; + mode = SDHCI_TRNS_BLK_CNT_EN | SDHCI_TRNS_MULTI; /* * If we are sending CMD23, CMD12 never gets sent * on successful completion (so no Auto-CMD12). |