]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
powerpc/mpc8536ds: Invert SDHC_WP pin polarity
authorXie Xiaobo <r63061@freescale.com>
Mon, 3 Oct 2011 19:18:40 +0000 (12:18 -0700)
committerKumar Gala <galak@kernel.crashing.org>
Sun, 9 Oct 2011 22:57:54 +0000 (17:57 -0500)
MPC8536 Rev 1.0 silicon have NMG_eSDHC118 erratum, so that the SDHC write
protected pin polarity does not follow the SD card standard in MPC8536
Rev 1.0 silicon.

The MPC8536DS board invert the SDHC_WP pin as a workaround.  However, this
silicon erratum has been fixed in Rev 1.1, So need invert the SDHC_WP
polarity again when use the MPC8536 Rev1.1 and greater on MPC8536DS board.

Signed-off-by: Xie Xiaobo <r63061@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
board/freescale/mpc8536ds/mpc8536ds.c

index 2beea345c5677006ee65585131dbbc65874dd8c4..c9f85c857b1ea6d11130d83950c2e3349d08ed26 100644 (file)
@@ -51,6 +51,14 @@ int board_early_init_f (void)
        setbits_be32(&gur->pmuxcr,
                        (MPC85xx_PMUXCR_SDHC_CD |
                         MPC85xx_PMUXCR_SDHC_WP));
+
+       /* The MPC8536DS board insert the SDHC_WP pin for erratum NMG_eSDHC118,
+        * however, this erratum only applies to MPC8536 Rev1.0.
+        * So set SDHC_WP to active-low when use MPC8536 Rev1.1 and greater.*/
+       if ((((SVR_MAJ(get_svr()) & 0x7) == 0x1) &&
+                       (SVR_MIN(get_svr()) >= 0x1))
+                       || (SVR_MAJ(get_svr() & 0x7) > 0x1))
+               setbits_be32(&gur->gencfgr, MPC85xx_GENCFGR_SDHC_WP_INV);
 #endif
        return 0;
 }