@@ -885,8 +885,21 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
u16 mode;
struct mmc_data *data = cmd->data;
- if (data == NULL)
+ if (data == NULL) {
+ if (cmd->opcode == MMC_SEND_TUNING_BLOCK ||
+ cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200)
+ /*
+ * The tuning block is sent by the card to the host
+ * controller. So we set the TRNS_READ bit in the
+ * Transfer Mode register. This also takes care of
+ * setting DMA Enable and Multi Block Select in the
+ * same register to 0.
+ */
+ sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE);
+ else
+ sdhci_writew(host, 0, SDHCI_TRANSFER_MODE);
return;
+ }
WARN_ON(!host->data);
@@ -1854,13 +1867,6 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
SDHCI_BLOCK_SIZE);
}
- /*
- * The tuning block is sent by the card to the host controller.
- * So we set the TRNS_READ bit in the Transfer Mode register.
- * This also takes care of setting DMA Enable and Multi Block
- * Select in the same register to 0.
- */
- sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE);
sdhci_send_command(host, &cmd);