qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH arm-devs v1 08/15] xilinx_spips: Add automatic start


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH arm-devs v1 08/15] xilinx_spips: Add automatic start support
Date: Wed, 3 Apr 2013 14:33:00 +1000

SPI has a mode where it automatically starts based on tx fifo
occupancy. Implemented.

Signed-off-by: Peter Crosthwaite <address@hidden>
---

 hw/xilinx_spips.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/xilinx_spips.c b/hw/xilinx_spips.c
index 4f921f8..f7d942e 100644
--- a/hw/xilinx_spips.c
+++ b/hw/xilinx_spips.c
@@ -446,7 +446,8 @@ static void xilinx_spips_write(void *opaque, hwaddr addr,
     }
     s->regs[addr] = (s->regs[addr] & ~mask) | (value & mask);
 no_reg_update:
-    if (man_start_com) {
+    if ((man_start_com && s->regs[R_CONFIG] & MAN_START_EN) ||
+            (fifo8_is_empty(&s->tx_fifo) && s->regs[R_CONFIG] & MAN_START_EN)) 
{
         xilinx_spips_flush_txfifo(s);
     }
     xilinx_spips_update_ixr(s);
-- 
1.7.0.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]