For T4240-R1.0-R2.0, the HOSTVER register has incorrcet vender
version value and sdhc spec version value. This will break down
the ADMA data transfer. So add workaround to get right value
VVN=0x13, SVN = 0x1.

Signed-off-by: Yangbo Lu <[email protected]>
---
 drivers/mmc/host/sdhci-of-esdhc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c 
b/drivers/mmc/host/sdhci-of-esdhc.c
index 20e0b9a..84496f0 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -70,6 +70,14 @@ static u16 esdhc_readw(struct sdhci_host *host, int reg)
                ret = in_be32(host->ioaddr + base) & 0xffff;
        else
                ret = (in_be32(host->ioaddr + base) >> shift) & 0xffff;
+
+       /* Workaround for T4240-R1.0-R2.0 eSDHC which has incorrect
+        * vendor version and spec version information.
+        */
+       if ((reg == SDHCI_HOST_VERSION) &&
+           (soc_ver == SVR_T4240) && (soc_rev <= 0x20))
+               ret = (VENDOR_V_23 << SDHCI_VENDOR_VER_SHIFT) | SDHCI_SPEC_200;
+
        return ret;
 }
 
-- 
2.1.0.27.g96db324

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to