qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] sd: pl181: fix fifo count read support
@ 2013-10-19  9:33 Jean-Christophe PLAGNIOL-VILLARD
  2013-10-25 11:04 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-10-19  9:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jean-Christophe PLAGNIOL-VILLARD

as it's depend on current direction

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 hw/sd/pl181.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 03875bf..91adbbd 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -344,7 +344,11 @@ static uint64_t pl181_read(void *opaque, hwaddr offset,
            data engine.  DataCnt is decremented after each byte is
            transferred between the serial engine and the card.
            We don't emulate this level of detail, so both can be the same.  */
-        tmp = (s->datacnt + 3) >> 2;
+	if (s->datactrl & PL181_DATA_DIRECTION)
+		tmp = s->fifo_len;
+	else
+		tmp = s->datacnt;
+        tmp = (tmp + 3) >> 2;
         if (s->linux_hack) {
             s->linux_hack = 0;
             pl181_fifo_run(s);
-- 
1.8.4.rc3

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

end of thread, other threads:[~2013-10-28 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-19  9:33 [Qemu-devel] [PATCH 1/1] sd: pl181: fix fifo count read support Jean-Christophe PLAGNIOL-VILLARD
2013-10-25 11:04 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-25 17:44   ` Peter Maydell
2013-10-28 13:24     ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-28 13:42       ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).