[PATCH v1 4/6] mmc: sdhci-of-esdhc: add erratum eSDHC7 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Yinbo Zhu <yinbo.zhu@xxxxxxx>

Invalid Transfer Complete (IRQSTAT[TC]) bit could be set during
multi-write operation even when the BLK_CNT in BLKATTR register
has not reached zero. Therefore, Transfer Complete might be
reported twice due to this erratum since a valid Transfer Complete
occurs when BLK_CNT reaches zero. This erratum is to fix this issue

Signed-off-by: Yinbo Zhu <yinbo.zhu@xxxxxxx>
---
 drivers/mmc/host/sdhci.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 6f604d6..8f72889 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2988,6 +2988,15 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
 		}
 
 		if (intmask & SDHCI_INT_DATA_END) {
+			if (of_find_compatible_node(NULL, NULL,
+							"fsl,p2020-esdhc")) {
+				command = SDHCI_GET_CMD(sdhci_readw(host,
+								SDHCI_COMMAND));
+				if (command == MMC_WRITE_MULTIPLE_BLOCK &&
+					sdhci_readw(host, SDHCI_BLOCK_COUNT)
+					 != 0)
+					return;
+			}
 			if (host->cmd == host->data_cmd) {
 				/*
 				 * Data managed to finish before the
-- 
1.7.1





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux