diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2011-03-21 21:28:38 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-03-21 21:28:38 +0100 |
commit | aa315f95b7c3c5b032cbc6c78f434a871002f558 (patch) | |
tree | 61c0142bd9a3f43aa6f800fcaebc2e1f0ccf5f5b /hw/vt82c686.c | |
parent | 32465727627711ff3e1cde6777a014413c3cb9ee (diff) | |
parent | 6d5ad9bf9318b1555d5567cd7e1760a51a55ebf8 (diff) |
Merge branch 'for-anthony' of git://github.com/bonzini/qemu
* 'for-anthony' of git://github.com/bonzini/qemu:
remove qemu_get_clock
add a generic scaling mechanism for timers
change all other clock references to use nanosecond resolution accessors
change all rt_clock references to use millisecond resolution accessors
add more helper functions with explicit milli/nanosecond resolution
Diffstat (limited to 'hw/vt82c686.c')
-rw-r--r-- | hw/vt82c686.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/vt82c686.c b/hw/vt82c686.c index cacc21767b..818460d716 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -186,7 +186,7 @@ typedef struct VT686MC97State { static uint32_t get_pmtmr(VT686PMState *s) { uint32_t d; - d = muldiv64(qemu_get_clock(vm_clock), PM_TIMER_FREQUENCY, get_ticks_per_sec()); + d = muldiv64(qemu_get_clock_ns(vm_clock), PM_TIMER_FREQUENCY, get_ticks_per_sec()); return d & 0xffffff; } @@ -195,7 +195,7 @@ static int get_pmsts(VT686PMState *s) int64_t d; int pmsts; pmsts = s->pmsts; - d = muldiv64(qemu_get_clock(vm_clock), PM_TIMER_FREQUENCY, get_ticks_per_sec()); + d = muldiv64(qemu_get_clock_ns(vm_clock), PM_TIMER_FREQUENCY, get_ticks_per_sec()); if (d >= s->tmr_overflow_time) s->pmsts |= TMROF_EN; return pmsts; @@ -238,7 +238,7 @@ static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val) pmsts = get_pmsts(s); if (pmsts & val & TMROF_EN) { /* if TMRSTS is reset, then compute the new overflow time */ - d = muldiv64(qemu_get_clock(vm_clock), PM_TIMER_FREQUENCY, get_ticks_per_sec()); + d = muldiv64(qemu_get_clock_ns(vm_clock), PM_TIMER_FREQUENCY, get_ticks_per_sec()); s->tmr_overflow_time = (d + 0x800000LL) & ~0x7fffffLL; } s->pmsts &= ~val; @@ -486,7 +486,7 @@ static int vt82c686b_pm_initfn(PCIDevice *dev) apm_init(&s->apm, NULL, s); - s->tmr_timer = qemu_new_timer(vm_clock, pm_tmr_timer, s); + s->tmr_timer = qemu_new_timer_ns(vm_clock, pm_tmr_timer, s); pm_smbus_init(&s->dev.qdev, &s->smb); |