All of lore.kernel.org
 help / color / mirror / Atom feed
From: peter.crosthwaite@xilinx.com
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, i.mitsyanko@samsung.com,
	edgar.iglesias@gmail.com
Subject: [Qemu-devel] [PATCH arm-devs v1 3/5] sd/sdhci: Fix Buffer Write Ready interrupt
Date: Tue, 21 May 2013 16:51:37 +1000	[thread overview]
Message-ID: <1f5bfe802b3e21ac5860ee02ed21dd8cd9d5f98a.1369118806.git.peter.crosthwaite@xilinx.com> (raw)
In-Reply-To: <cover.1369118806.git.peter.crosthwaite@xilinx.com>

From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

This interrupt is not risen after the last block is written to sd. It
is mutually exclusive with the end of transfer conditions. Fix.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/sd/sdhci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 0a84540..ea510b5 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -405,15 +405,14 @@ static void sdhci_write_block_to_card(SDHCIState *s)
 
     /* Next data can be written through BUFFER DATORT register */
     s->prnsts |= SDHC_SPACE_AVAILABLE;
-    if (s->norintstsen & SDHC_NISEN_WBUFRDY) {
-        s->norintsts |= SDHC_NIS_WBUFRDY;
-    }
 
     /* Finish transfer if that was the last block of data */
     if ((s->trnmod & SDHC_TRNS_MULTI) == 0 ||
             ((s->trnmod & SDHC_TRNS_MULTI) &&
             (s->trnmod & SDHC_TRNS_BLK_CNT_EN) && (s->blkcnt == 0))) {
         SDHCI_GET_CLASS(s)->end_data_transfer(s);
+    } else if (s->norintstsen & SDHC_NISEN_WBUFRDY) {
+        s->norintsts |= SDHC_NIS_WBUFRDY;
     }
 
     /* Generate Block Gap Event if requested and if not the last block */
-- 
1.8.3.rc1.44.gb387c77.dirty

  parent reply	other threads:[~2013-05-21  6:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  6:49 [Qemu-devel] [PATCH arm-devs v1 0/5] SD and SDHCI Fixes peter.crosthwaite
2013-05-21  6:50 ` [Qemu-devel] [PATCH arm-devs v1 1/5] sd/sd.c: Fix "inquiry" ACMD41 peter.crosthwaite
2013-05-21  9:46   ` Peter Maydell
2013-05-21  6:50 ` [Qemu-devel] [PATCH arm-devs v1 2/5] sd/sdhci.c: Only reset data_count on new commands peter.crosthwaite
2013-05-21  6:51 ` peter.crosthwaite [this message]
2013-05-21  6:52 ` [Qemu-devel] [PATCH arm-devs v1 4/5] sd/sdhci.c: Fix bdata_read DPRINT message peter.crosthwaite
2013-05-21  9:47   ` Peter Maydell
2013-05-21  6:53 ` [Qemu-devel] [PATCH arm-devs v1 5/5] sd/sdhci:ADMA: fix interrupt peter.crosthwaite
2013-05-22 13:37 [Qemu-devel] [PATCH arm-devs v1 3/5] sd/sdhci: Fix Buffer Write Ready interrupt Igor Mitsyanko

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=1f5bfe802b3e21ac5860ee02ed21dd8cd9d5f98a.1369118806.git.peter.crosthwaite@xilinx.com \
    --to=peter.crosthwaite@xilinx.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=i.mitsyanko@samsung.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.