Re: [PATCH v1 3/6] mmc: sdhci-of-esdhc: add erratum A-009204 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/02/19 5:16 AM, Yinbo Zhu wrote:
> From: Yinbo Zhu <yinbo.zhu@xxxxxxx>
> 
> 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@xxxxxxx>
> ---
>  drivers/mmc/host/sdhci.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 39bbbd7..6f604d6 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -243,6 +243,9 @@ static void sdhci_do_reset(struct sdhci_host *host, u8 mask)
>  
>  	host->ops->reset(host, mask);
>  
> +	if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc"))
> +		mdelay(5);

Why not do that within the driver's ->reset() fn?

> +
>  	if (mask & SDHCI_RESET_ALL) {
>  		if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) {
>  			if (host->ops->enable_dma)
> 




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux