Re: [PATCH] mmc: atmel-mci: save and restore sdioirq when soft reset is performed

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

 



On 02/09/2012 11:55 AM, ludovic.desroches@xxxxxxxxx :
> From: Ludovic Desroches <ludovic.desroches@xxxxxxxxx>
> 
> Sometimes a software reset is needed. Then some registers are saved and
> restored but the interrupt mask register is missing. It causes issues
> with sdio devices whose interrupts are masked after reset.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@xxxxxxxxx>

Signed-off-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>

Chris, can you please queue this patch in a "fixes" branch?

Thanks, best regards,

> Cc: stable@xxxxxxxxxxxxxxx
> ---
>  drivers/mmc/host/atmel-mci.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 09ac13b..dfa5dd9 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -965,11 +965,14 @@ static void atmci_start_request(struct atmel_mci *host,
>  	host->data_status = 0;
>  
>  	if (host->need_reset) {
> +		iflags = atmci_readl(host, ATMCI_IMR);
> +		iflags &= (ATMCI_SDIOIRQA | ATMCI_SDIOIRQB);
>  		atmci_writel(host, ATMCI_CR, ATMCI_CR_SWRST);
>  		atmci_writel(host, ATMCI_CR, ATMCI_CR_MCIEN);
>  		atmci_writel(host, ATMCI_MR, host->mode_reg);
>  		if (host->caps.has_cfg_reg)
>  			atmci_writel(host, ATMCI_CFG, host->cfg_reg);
> +		atmci_writel(host, ATMCI_IER, iflags);
>  		host->need_reset = false;
>  	}
>  	atmci_writel(host, ATMCI_SDCR, slot->sdc_reg);


-- 
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux