public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap_hsmmc: Flush posted write to IRQ
@ 2009-04-06 12:01 Adrian Hunter
  2009-04-06 16:49 ` Tony Lindgren
  2009-04-07 23:31 ` [APPLIED] " Tony Lindgren
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Hunter @ 2009-04-06 12:01 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: LKML, Kevin Hilman, Tony Lindgren, linux-omap Mailing List

From: Kevin Hilman <khilman@deeprootsystems.com>

Spurious IRQs seen on MMC after 2.6.29.  Flush posted write in IRQ
handler.

The interrupt line is released by clearing the error status bits
in the MMCHS_STAT register, which must occur before the interrupt
handler returns to avoid unwanted irqs.  Hence the need to flush
the posted write.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
---




This patch is slightly modified from Kevin's original, which is
here:

	http://marc.info/?l=linux-omap&m=123862814815052&w=2



 drivers/mmc/host/omap_hsmmc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 04e5a0c..2ae6049 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -452,6 +452,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
 	if (host->mrq == NULL) {
 		OMAP_HSMMC_WRITE(host->base, STAT,
 			OMAP_HSMMC_READ(host->base, STAT));
+		/* Flush posted write */
+		OMAP_HSMMC_READ(host->base, STAT);
 		return IRQ_HANDLED;
 	}
 
@@ -523,6 +525,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
 	}
 
 	OMAP_HSMMC_WRITE(host->base, STAT, status);
+	/* Flush posted write */
+	OMAP_HSMMC_READ(host->base, STAT);
 
 	if (end_cmd || (status & CC))
 		mmc_omap_cmd_done(host, host->cmd);
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] omap_hsmmc: Flush posted write to IRQ
  2009-04-06 12:01 [PATCH] omap_hsmmc: Flush posted write to IRQ Adrian Hunter
@ 2009-04-06 16:49 ` Tony Lindgren
  2009-04-08 18:36   ` Pierre Ossman
  2009-04-07 23:31 ` [APPLIED] " Tony Lindgren
  1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2009-04-06 16:49 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Pierre Ossman, LKML, Kevin Hilman, linux-omap Mailing List

* Adrian Hunter <adrian.hunter@nokia.com> [090406 05:00]:
> From: Kevin Hilman <khilman@deeprootsystems.com>
>
> Spurious IRQs seen on MMC after 2.6.29.  Flush posted write in IRQ
> handler.
>
> The interrupt line is released by clearing the error status bits
> in the MMCHS_STAT register, which must occur before the interrupt
> handler returns to avoid unwanted irqs.  Hence the need to flush
> the posted write.
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>

Acked-by: Tony Lindgen <tony@atomide.com>

> ---
>
>
>
>
> This patch is slightly modified from Kevin's original, which is
> here:
>
> 	http://marc.info/?l=linux-omap&m=123862814815052&w=2
>
>
>
> drivers/mmc/host/omap_hsmmc.c |    4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 04e5a0c..2ae6049 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -452,6 +452,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
> 	if (host->mrq == NULL) {
> 		OMAP_HSMMC_WRITE(host->base, STAT,
> 			OMAP_HSMMC_READ(host->base, STAT));
> +		/* Flush posted write */
> +		OMAP_HSMMC_READ(host->base, STAT);
> 		return IRQ_HANDLED;
> 	}
>
> @@ -523,6 +525,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
> 	}
>
> 	OMAP_HSMMC_WRITE(host->base, STAT, status);
> +	/* Flush posted write */
> +	OMAP_HSMMC_READ(host->base, STAT);
>
> 	if (end_cmd || (status & CC))
> 		mmc_omap_cmd_done(host, host->cmd);
> -- 
> 1.5.6.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [APPLIED] [PATCH] omap_hsmmc: Flush posted write to IRQ
  2009-04-06 12:01 [PATCH] omap_hsmmc: Flush posted write to IRQ Adrian Hunter
  2009-04-06 16:49 ` Tony Lindgren
@ 2009-04-07 23:31 ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-04-07 23:31 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Initial commit ID (Likely to change): 346ac90bcf6d0e8a91b398237facd8d9fb2a7cde

PatchWorks
http://patchwork.kernel.org/patch/16515/

Git
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=346ac90bcf6d0e8a91b398237facd8d9fb2a7cde



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] omap_hsmmc: Flush posted write to IRQ
  2009-04-06 16:49 ` Tony Lindgren
@ 2009-04-08 18:36   ` Pierre Ossman
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Ossman @ 2009-04-08 18:36 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Adrian Hunter, LKML, Kevin Hilman, linux-omap Mailing List

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

On Mon, 6 Apr 2009 09:49:18 -0700
Tony Lindgren <tony@atomide.com> wrote:

> * Adrian Hunter <adrian.hunter@nokia.com> [090406 05:00]:
> > From: Kevin Hilman <khilman@deeprootsystems.com>
> >
> > Spurious IRQs seen on MMC after 2.6.29.  Flush posted write in IRQ
> > handler.
> >
> > The interrupt line is released by clearing the error status bits
> > in the MMCHS_STAT register, which must occur before the interrupt
> > handler returns to avoid unwanted irqs.  Hence the need to flush
> > the posted write.
> >
> > Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> > Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
> 
> Acked-by: Tony Lindgen <tony@atomide.com>
> 

Queued.

-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-08 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 12:01 [PATCH] omap_hsmmc: Flush posted write to IRQ Adrian Hunter
2009-04-06 16:49 ` Tony Lindgren
2009-04-08 18:36   ` Pierre Ossman
2009-04-07 23:31 ` [APPLIED] " Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox