Message ID | 20190305025811.38328-3-yinbo.zhu@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/5] mmc: sdhci-of-esdhc: add erratum eSDHC5 support | expand |
On 5/03/19 4:59 AM, Yinbo Zhu wrote: > From: Yinbo Zhu <yinbo.zhu@nxp.com> > > In the event of that any data error (like, IRQSTAT[DCE]) occurs > during an eSDHC data transaction where DMA is used for data > transfer to/from the system memory, setting the SYSCTL[RSTD] > register may cause a system hang. If software sets the register > SYSCTL[RSTD] to 1 for error recovery while DMA transferring is > not complete, eSDHC may hang the system bus. This happens because > the software register SYSCTL[RSTD] resets the DMA engine without > waiting for the completion of pending system transactions. This > erratum is to fix this issue. > > Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/sdhci-of-esdhc.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c > index 1ac1133..7e0eae8 100644 > --- a/drivers/mmc/host/sdhci-of-esdhc.c > +++ b/drivers/mmc/host/sdhci-of-esdhc.c > @@ -694,6 +694,9 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask) > sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); > sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); > > + if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) > + mdelay(5); > + > if (mask & SDHCI_RESET_ALL) { > val = sdhci_readl(host, ESDHC_TBCTL); > val &= ~ESDHC_TB_EN; >
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 1ac1133..7e0eae8 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -694,6 +694,9 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask) sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); + if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) + mdelay(5); + if (mask & SDHCI_RESET_ALL) { val = sdhci_readl(host, ESDHC_TBCTL); val &= ~ESDHC_TB_EN;