From: Andy Fleming <afleming@right.am.freescale.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] fsl_esdhc: Do not clear interrupt status bits until data processed
Date: Fri, 14 Jun 2013 13:55:09 -0500 [thread overview]
Message-ID: <20130614185509.GF29946@right.am.freescale.net> (raw)
In-Reply-To: <1370964862-26947-1-git-send-email-andrew_gabbasov@mentor.com>
On Tue, Jun 11, 2013 at 10:34:22AM -0500, Andrew Gabbasov wrote:
> After waiting for the command completion event, the interrupt status
> bits, that occured to be set by that time, are cleared by writing them
> back. It is supposed, that it should be command related bits (command
> complete and may be command errors).
>
> However, in some cases the DMA already completes by that time before
> the full transaction completes. The corresponding DINT bit gets set
> and then cleared before even entering the loop, waiting for data part
> completion. That waiting loop never gets this bit set, causing the
> operation to hang. This is reported to happen, for example, for write
> operation of 1 sector to upper area (block #7400000) of SanDisk Ultra II
> 8GB card.
>
> The solution could be to explicitly clear only command related interrupt
> status bits. However, since subsequent processing does not rely on
> any command bits state, it could be easier just to remove clearing
> of any bits at that point, leaving them all until all data processing
> completes. After that the whole register will be cleared at once.
>
> Also, on occasion, interrupts masking moved to before writing the command,
> just for the case there should be no chance of interrupt between the first
> command and interrupts masking.
>
> Reported-by: Dirk Behme <dirk.behme@de.bosch.com>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
> Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Applied, Thanks!
Andy
prev parent reply other threads:[~2013-06-14 18:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 9:06 [U-Boot] [Patch] fsl_esdhc: Fix DMA transfer completion waiting loop Andrew Gabbasov
2013-04-14 7:19 ` Dirk Behme
2013-04-14 9:25 ` Stefano Babic
2013-06-10 12:06 ` Dirk Behme
2013-06-10 14:51 ` Gabbasov, Andrew
2013-06-11 8:16 ` Dirk Behme
2013-06-11 15:24 ` Gabbasov, Andrew
2013-06-11 15:34 ` [U-Boot] [PATCH] fsl_esdhc: Do not clear interrupt status bits until data processed Andrew Gabbasov
2013-06-12 5:16 ` Dirk Behme
2013-06-14 18:55 ` Andy Fleming [this message]
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=20130614185509.GF29946@right.am.freescale.net \
--to=afleming@right.am.freescale.net \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox