Revision 74475455 hw/dp8393x.c
b/hw/dp8393x.c | ||
---|---|---|
290 | 290 |
} |
291 | 291 |
|
292 | 292 |
ticks = s->regs[SONIC_WT1] << 16 | s->regs[SONIC_WT0]; |
293 |
s->wt_last_update = qemu_get_clock(vm_clock); |
|
293 |
s->wt_last_update = qemu_get_clock_ns(vm_clock);
|
|
294 | 294 |
delay = get_ticks_per_sec() * ticks / 5000000; |
295 | 295 |
qemu_mod_timer(s->watchdog, s->wt_last_update + delay); |
296 | 296 |
} |
... | ... | |
305 | 305 |
return; |
306 | 306 |
} |
307 | 307 |
|
308 |
elapsed = s->wt_last_update - qemu_get_clock(vm_clock); |
|
308 |
elapsed = s->wt_last_update - qemu_get_clock_ns(vm_clock);
|
|
309 | 309 |
val = s->regs[SONIC_WT1] << 16 | s->regs[SONIC_WT0]; |
310 | 310 |
val -= elapsed / 5000000; |
311 | 311 |
s->regs[SONIC_WT1] = (val >> 16) & 0xffff; |
... | ... | |
895 | 895 |
s->memory_rw = memory_rw; |
896 | 896 |
s->it_shift = it_shift; |
897 | 897 |
s->irq = irq; |
898 |
s->watchdog = qemu_new_timer(vm_clock, dp8393x_watchdog, s); |
|
898 |
s->watchdog = qemu_new_timer_ns(vm_clock, dp8393x_watchdog, s);
|
|
899 | 899 |
s->regs[SONIC_SR] = 0x0004; /* only revision recognized by Linux */ |
900 | 900 |
|
901 | 901 |
memcpy(s->conf.macaddr.a, nd->macaddr, sizeof(s->conf.macaddr)); |
Also available in: Unified diff