Commit d3fc5d71 authored by Vincent Yang's avatar Vincent Yang Committed by Ulf Hansson

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: default avatarVincent Yang <Vincent.Yang@tw.fujitsu.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 67d0d04a
...@@ -904,7 +904,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) ...@@ -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, static void sdhci_set_transfer_mode(struct sdhci_host *host,
struct mmc_command *cmd) struct mmc_command *cmd)
{ {
u16 mode; u16 mode = 0;
struct mmc_data *data = cmd->data; struct mmc_data *data = cmd->data;
if (data == NULL) { if (data == NULL) {
...@@ -922,9 +922,11 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, ...@@ -922,9 +922,11 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
WARN_ON(!host->data); WARN_ON(!host->data);
if (!(host->quirks2 & SDHCI_QUIRK2_SUPPORT_SINGLE))
mode = SDHCI_TRNS_BLK_CNT_EN; mode = SDHCI_TRNS_BLK_CNT_EN;
if (mmc_op_multi(cmd->opcode) || data->blocks > 1) { 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 * If we are sending CMD23, CMD12 never gets sent
* on successful completion (so no Auto-CMD12). * on successful completion (so no Auto-CMD12).
......
...@@ -113,6 +113,8 @@ struct sdhci_host { ...@@ -113,6 +113,8 @@ struct sdhci_host {
#define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11)
/* forced tuned clock */ /* forced tuned clock */
#define SDHCI_QUIRK2_TUNING_WORK_AROUND (1<<12) #define SDHCI_QUIRK2_TUNING_WORK_AROUND (1<<12)
/* disable the block count for single block transactions */
#define SDHCI_QUIRK2_SUPPORT_SINGLE (1<<13)
int irq; /* Device IRQ */ int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */ void __iomem *ioaddr; /* Mapped address */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment