@@ -2316,6 +2316,9 @@ EXPORT_SYMBOL_GPL(sdhci_start_tuning);
void sdhci_end_tuning(struct sdhci_host *host)
{
+ if (host->quirks2 & SDHCI_QUIRK2_RESET_DATA_POST_TUNING)
+ sdhci_reset(host, SDHCI_RESET_DATA);
+
sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);
}
@@ -484,6 +484,10 @@ struct sdhci_host {
* block count.
*/
#define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18)
+/*
+ * Controller needs to reset data lines once tuning is complete
+ */
+#define SDHCI_QUIRK2_RESET_DATA_POST_TUNING (1<<19)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
Some arasan controllers have data leftover in the buffer after tuning procedure is complete which interferes with future data commands. Add a quirk to reset the data after tuning is finished. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 4 ++++ 2 files changed, 7 insertions(+)