Message ID | 63ec3ba3814fa4ab6ce7957d757e41ae8b634cd3.1326928134.git.jan.kiszka@web.de |
---|---|
State | New |
Headers | show |
diff --git a/hw/i8254.c b/hw/i8254.c index cf9ed2f..df42c07 100644 --- a/hw/i8254.c +++ b/hw/i8254.c @@ -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->irq_disabled) { + s->next_transition_time = + pit_get_next_transition_time(s, s->count_load_time); + qemu_mod_timer(s->irq_timer, s->next_transition_time); + } } }