qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 61/66] PPC: xnu kernel expects FLUSH to be cleared o


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 61/66] PPC: xnu kernel expects FLUSH to be cleared on STOP
Date: Fri, 8 Mar 2013 21:07:03 +0100

From: Amadeusz Sławiński <address@hidden>

otherwise it gets stuck in a loop
so clear it when unsetting run when flush is set

void
IODBDMAStop( volatile IODBDMAChannelRegisters *registers)
{

        IOSetDBDMAChannelControl( registers,
        IOClearDBDMAChannelControlBits( kdbdmaRun )
                | IOSetDBDMAChannelControlBits(  kdbdmaFlush ));

DBDMA: writel 0x0000000000000b00 <= 0xa0002000
DBDMA: channel 0x16 reg 0x0
DBDMA:     status 0x00002000

        while( IOGetDBDMAChannelStatus( registers) & (
                        kdbdmaActive | kdbdmaFlush))
                eieio();

DBDMA: readl 0x0000000000000b04 => 0x00002000
DBDMA: channel 0x16 reg 0x1
DBDMA: readl 0x0000000000000b04 => 0x00002000
DBDMA: channel 0x16 reg 0x1
DBDMA: readl 0x0000000000000b04 => 0x00002000
DBDMA: channel 0x16 reg 0x1
DBDMA: readl 0x0000000000000b04 => 0x00002000
DBDMA: channel 0x16 reg 0x1
it continues to get printed

}

Signed-off-by: Amadeusz Sławiński <address@hidden>
[agraf: replace tabs with spaces]
Signed-off-by: Alexander Graf <address@hidden>
---
 hw/mac_dbdma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c
index b894ab2..73d74c2 100644
--- a/hw/mac_dbdma.c
+++ b/hw/mac_dbdma.c
@@ -688,6 +688,10 @@ dbdma_control_write(DBDMA_channel *ch)
     if ((ch->regs[DBDMA_STATUS] & RUN) && !(status & RUN)) {
         /* RUN is cleared */
         status &= ~(ACTIVE|DEAD);
+        if ((status & FLUSH) && ch->flush) {
+            ch->flush(&ch->io);
+            status &= ~FLUSH;
+        }
     }
 
     DBDMA_DPRINTF("    status 0x%08x\n", status);
-- 
1.6.0.2




reply via email to

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