]> Git Repo - qemu.git/commitdiff
i8254: Do not raise IRQ level on reset
authorJan Kiszka <[email protected]>
Wed, 1 Feb 2012 19:31:37 +0000 (20:31 +0100)
committerAnthony Liguori <[email protected]>
Fri, 17 Feb 2012 15:58:22 +0000 (09:58 -0600)
Avoid changing the IRQ level to high on reset as it may trigger spurious
events. Instead, open-code the effects of pit_load_count(0) in the reset
handler.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/i8254.c

index 481fc7b2523ff8df628b7c724724de46a2c9a876..d55b22148b1d683c5e2b9926edea9c81321d5968 100644 (file)
@@ -481,7 +481,13 @@ static void pit_reset(DeviceState *dev)
         s = &pit->channels[i];
         s->mode = 3;
         s->gate = (i != 2);
-        pit_load_count(s, 0);
+        s->count_load_time = qemu_get_clock_ns(vm_clock);
+        s->count = 0x10000;
+        if (i == 0) {
+            s->next_transition_time =
+                pit_get_next_transition_time(s, s->count_load_time);
+            qemu_mod_timer(s->irq_timer, s->next_transition_time);
+        }
     }
 }
 
This page took 0.028345 seconds and 4 git commands to generate.