summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLi Jingyu <b41874@freescale.com>2014-11-26 01:16:27 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:41:19 (GMT)
commit2c4f6dd4fa829b44706518dc36d1056fc6c6a4fc (patch)
tree63e5b06f6cdbf75086d4a80aecddbb8bfb85b154 /drivers/mmc
parentcbb43234adaa0644e69a753c7a6782cfa3ba343d (diff)
downloadlinux-fsl-qoriq-2c4f6dd4fa829b44706518dc36d1056fc6c6a4fc.tar.xz
mmc: esdhc: Follow T4240 eSDHC characteristic for T4160 and T4080
The T4160 is a lower power version of the T4240, and The T4080 is a low power version of the T4160. So they have the same eSDHC controller. Signed-off-by: Li Jingyu <b41874@freescale.com> Change-Id: Iab5b0ae09bdd8b9c720c29168dfdafc23a5dde0d Reviewed-on: http://git.am.freescale.net:8181/24502 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Xiaobo Xie <X.Xie@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-of-esdhc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 244c42a..6d71e1a 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -80,7 +80,9 @@ static u16 esdhc_readw(struct sdhci_host *host, int reg)
#if defined CONFIG_PPC_OF
/* T4240-R1.0-R2.0 had a incorrect vendor version and spec version */
if ((reg == SDHCI_HOST_VERSION) &&
- ((SVR_SOC_VER(svr) == SVR_T4240) &&
+ (((SVR_SOC_VER(svr) == SVR_T4240) ||
+ (SVR_SOC_VER(svr) == SVR_T4160) ||
+ (SVR_SOC_VER(svr) == SVR_T4080)) &&
(SVR_REV(svr) <= 0x20)))
ret = (VENDOR_V_23 << SDHCI_VENDOR_VER_SHIFT) | SDHCI_SPEC_200;
#endif
@@ -217,7 +219,9 @@ static void esdhc_writeb(struct sdhci_host *host, u8 val, int reg)
return;
#if defined CONFIG_PPC_OF
- if (SVR_SOC_VER(svr) == SVR_T4240) {
+ if (SVR_SOC_VER(svr) == SVR_T4240 ||
+ SVR_SOC_VER(svr) == SVR_T4160 ||
+ SVR_SOC_VER(svr) == SVR_T4080) {
u8 vol;
vol = sdhci_32bs_readb(host, reg);
@@ -281,6 +285,7 @@ static void esdhci_of_adma_workaround(struct sdhci_host *host, u32 intmask)
*/
if (!(((SVR_SOC_VER(svr) == SVR_T4240) && (SVR_REV(svr) == 0x10)) ||
((SVR_SOC_VER(svr) == SVR_T4160) && (SVR_REV(svr) == 0x10)) ||
+ ((SVR_SOC_VER(svr) == SVR_T4080) && (SVR_REV(svr) == 0x10)) ||
((SVR_SOC_VER(svr) == SVR_B4420) && (SVR_REV(svr) == 0x10)) ||
((SVR_SOC_VER(svr) == SVR_B4420) && (SVR_REV(svr) == 0x20)) ||
((SVR_SOC_VER(svr) == SVR_B4860) && (SVR_REV(svr) == 0x10)) ||
@@ -447,6 +452,8 @@ static void esdhc_of_platform_init(struct sdhci_host *host)
((SVR_SOC_VER(svr) == SVR_T4240) && (SVR_REV(svr) == 0x20)) ||
((SVR_SOC_VER(svr) == SVR_T4160) && (SVR_REV(svr) == 0x10)) ||
((SVR_SOC_VER(svr) == SVR_T4160) && (SVR_REV(svr) == 0x20)) ||
+ ((SVR_SOC_VER(svr) == SVR_T4080) && (SVR_REV(svr) == 0x10)) ||
+ ((SVR_SOC_VER(svr) == SVR_T4080) && (SVR_REV(svr) == 0x20)) ||
((SVR_SOC_VER(svr) == SVR_B4860) && (SVR_REV(svr) == 0x10)) ||
((SVR_SOC_VER(svr) == SVR_B4860) && (SVR_REV(svr) == 0x20)) ||
((SVR_SOC_VER(svr) == SVR_B4420) && (SVR_REV(svr) == 0x10)) ||