]> Git Repo - qemu.git/commitdiff
musicpal: True reset support for audio device
authorJan Kiszka <[email protected]>
Fri, 18 Sep 2009 18:51:23 +0000 (20:51 +0200)
committerAnthony Liguori <[email protected]>
Mon, 5 Oct 2009 14:32:43 +0000 (09:32 -0500)
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/marvell_88w8618_audio.c

index d6c14c62cd47c4eecb43ffa74467e5ba77a273e4..7f17a9f1fce648cccf053465bc10e11516e55a62 100644 (file)
@@ -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",
This page took 0.029005 seconds and 4 git commands to generate.