All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: ludovic.desroches@atmel.com, cjb@laptop.org
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mmc: atmel-mci: save and restore sdioirq when soft reset is performed
Date: Thu, 09 Feb 2012 10:05:51 +0100	[thread overview]
Message-ID: <4F338C6F.9030802@atmel.com> (raw)
In-Reply-To: <1328784929-24174-1-git-send-email-ludovic.desroches@atmel.com>

On 02/09/2012 11:55 AM, ludovic.desroches@atmel.com :
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
> 
> 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@atmel.com>

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

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

Thanks, best regards,

> Cc: stable@vger.kernel.org
> ---
>  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

WARNING: multiple messages have this Message-ID (diff)
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: atmel-mci: save and restore sdioirq when soft reset is performed
Date: Thu, 09 Feb 2012 10:05:51 +0100	[thread overview]
Message-ID: <4F338C6F.9030802@atmel.com> (raw)
In-Reply-To: <1328784929-24174-1-git-send-email-ludovic.desroches@atmel.com>

On 02/09/2012 11:55 AM, ludovic.desroches at atmel.com :
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
> 
> 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@atmel.com>

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

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

Thanks, best regards,

> Cc: stable at vger.kernel.org
> ---
>  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

  reply	other threads:[~2012-02-09  9:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 17:22 [PATCH] mmc: atmel-mci: save and restore sdioirq when soft reset is performed ludovic.desroches
2012-02-08 17:22 ` ludovic.desroches at atmel.com
2012-02-08 15:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-08 15:26   ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-08 15:45   ` Ludovic Desroches
2012-02-08 15:45     ` Ludovic Desroches
2012-02-08 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-08 16:17       ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-09 10:55 ` ludovic.desroches
2012-02-09 10:55   ` ludovic.desroches at atmel.com
2012-02-09  9:05   ` Nicolas Ferre [this message]
2012-02-09  9:05     ` Nicolas Ferre
2012-02-11 21:26     ` Chris Ball
2012-02-11 21:26       ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F338C6F.9030802@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=cjb@laptop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.