drivers: mmc: PIC32MZ[DA] SDHCI errata fix when JTAG is not connected.
PATCH 16/18 drivers: mmc: PIC32MZ[DA] SDHCI errata fix when JTAG is not connected.
From: Sandeep Sheriker Mallikarjun <[email protected]>
In PIC32MZ[DA] SoC JTAG and Card_Detect signal are muxed. These created one h/w bug; SDHCI will not detect micro-SD card if JTAG is not connected. To fix this errata,
- set Card_Detect_Signal_Selection bit in SDHC HostControl register and
- clear CardDetectTestLevel bit in SDHC HostControl register.
Signed-off-by Sandeep Sheriker Mallikarjun <[email protected]>
Signed-off-by Purna Chandra Mandal <[email protected]>
---
drivers/mmc/sdhci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/mmc/sdhci.c +12 -0
@@ -424,6 +424,18 @@ static void sdhci_set_ios(struct mmc *mmc)if (host->quirks &SDHCI_QUIRK_NO_HISPD_BIT ) ctrl &= ~SDHCI_CTRL_HISPD ; +#if defined(CONFIG_PIC32_SDHCI ) +/* +* In PIC32MZ[DA] due to h/w bug SDHCI fails detecting card when JTAG +* is not connected. +* To work-around this problem: +* - set Card_Detect_Signal_Selection bit in SDHCI_Host_Control register +* - clear Card_Detect_Test_Level bit in SDHCI_Host_Control register +*/ + ctrl |=SDHCI_CTRL_CD_TEST ; + ctrl &= ~SDHCI_CTRL_CD_TEST_INS ; +#endif +sdhci_writeb (host, ctrl,SDHCI_HOST_CONTROL ); }
Signature · 1 line
1.8.3.1