]> git.sur5r.net Git - u-boot/commitdiff
fsl_esdhc: Add the workaround for erratum ESDHC-A001 (enable on P2020)
authorKumar Gala <galak@kernel.crashing.org>
Sat, 29 Jan 2011 21:36:10 +0000 (15:36 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 3 Feb 2011 08:46:12 +0000 (02:46 -0600)
Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 4, 8,
and 12. Program one more than the desired value: 4 -> 5, 8 -> 9, 12 -> 13.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc85xx/cmd_errata.c
arch/powerpc/include/asm/config_mpc85xx.h
drivers/mmc/fsl_esdhc.c

index 0cc8b1e130cce32d66e908cf20c4d84350de0714..4f8134bef5e30e27b37facbe0e0fb298c0bd43f9 100644 (file)
@@ -59,6 +59,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC136)
        puts("Work-around for Erratum ESDHC136 enabled\n");
 #endif
+#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
+       puts("Work-around for Erratum ESDHC-A001 enabled\n");
+#endif
 #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
        puts("Work-around for Erratum CPC-A002 enabled\n");
 #endif
index 9919d97c0e8ff8e3a56fe6ee226c7370b26fa5ed..c771a4b61dc11cad2e8a97634e818aabf7d204aa 100644 (file)
 #define CONFIG_SYS_FSL_NUM_LAWS                12
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
+#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
 
 #elif defined(CONFIG_P2020)
 #define CONFIG_MAX_CPUS                        2
 #define CONFIG_SYS_FSL_NUM_LAWS                12
 #define CONFIG_SYS_FSL_SEC_COMPAT      2
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
+#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
 
 #elif defined(CONFIG_PPC_P2040)
 #define CONFIG_MAX_CPUS                        4
index d01c926c4554debbe4fc6e61239d49cfbfc40ab0..f3cccbe9bfdc4ed0bbbc8d373af7def8a44af8cf 100644 (file)
@@ -219,6 +219,11 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
        if (timeout < 0)
                timeout = 0;
 
+#ifdef CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
+       if ((timeout == 4) || (timeout == 8) || (timeout == 12))
+               timeout++;
+#endif
+
        esdhc_clrsetbits32(&regs->sysctl, SYSCTL_TIMEOUT_MASK, timeout << 16);
 
        return 0;