qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [COMMIT 267c484] musicpal: True reset support for audio d


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 267c484] musicpal: True reset support for audio device
Date: Mon, 05 Oct 2009 14:53:18 -0000

From: Jan Kiszka <address@hidden>

Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/marvell_88w8618_audio.c b/hw/marvell_88w8618_audio.c
index d6c14c6..7f17a9f 100644
--- a/hw/marvell_88w8618_audio.c
+++ b/hw/marvell_88w8618_audio.c
@@ -222,6 +222,9 @@ static void mv88w8618_audio_reset(void *opaque)
     s->playback_mode = 0;
     s->status = 0;
     s->irq_enable = 0;
+    s->clock_div = 0;
+    s->threshold = 0;
+    s->phys_buf = 0;
 }
 
 static CPUReadMemoryFunc * const mv88w8618_audio_readfn[] = {
@@ -249,8 +252,6 @@ static int mv88w8618_audio_init(SysBusDevice *dev)
                                        mv88w8618_audio_writefn, s);
     sysbus_init_mmio(dev, MP_AUDIO_SIZE, iomemtype);
 
-    qemu_register_reset(mv88w8618_audio_reset, s);
-
     return 0;
 }
 
@@ -258,6 +259,7 @@ static SysBusDeviceInfo mv88w8618_audio_info = {
     .init = mv88w8618_audio_init,
     .qdev.name  = "mv88w8618_audio",
     .qdev.size  = sizeof(mv88w8618_audio_state),
+    .qdev.reset = mv88w8618_audio_reset,
     .qdev.props = (Property[]) {
         {
             .name   = "wm8750",




reply via email to

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