diff options
author | David 'Digit' Turner <digit@android.com> | 2011-05-10 07:06:00 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-06-01 17:08:17 +0200 |
commit | 5973c775c853e26f684de58ad28c267281aaffd6 (patch) | |
tree | a1db31a2a98ec793e396a2de72f1a8858315d7af /hw/i8254.c | |
parent | 317c9d54284844615b33a25834a63248bf1bfa73 (diff) | |
download | external_qemu-5973c775c853e26f684de58ad28c267281aaffd6.zip external_qemu-5973c775c853e26f684de58ad28c267281aaffd6.tar.gz external_qemu-5973c775c853e26f684de58ad28c267281aaffd6.tar.bz2 |
qemu-timer.c: rename qemu_timer_new_scale()
Get rid of qemu_timer_new() implementation, and update all
callers to use qemu_timer_new_ms() or qemu_timer_new_ns()
instead.
Rename qemu_new_timer_scale() to qemu_new_timer() to follow
upstream conventions.
Change-Id: Id2c04f8597ec5026e02f87b3e2c5507920eb688e
Diffstat (limited to 'hw/i8254.c')
-rw-r--r-- | hw/i8254.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -66,7 +66,7 @@ static int pit_get_count(PITChannelState *s) uint64_t d; int counter; - d = muldiv64(qemu_get_clock(vm_clock) - s->count_load_time, PIT_FREQ, get_ticks_per_sec()); + d = muldiv64(qemu_get_clock_ns(vm_clock) - s->count_load_time, PIT_FREQ, get_ticks_per_sec()); switch(s->mode) { case 0: case 1: @@ -189,7 +189,7 @@ void pit_set_gate(PITState *pit, int channel, int val) case 5: if (s->gate < val) { /* restart counting on rising edge */ - s->count_load_time = qemu_get_clock(vm_clock); + s->count_load_time = qemu_get_clock_ns(vm_clock); pit_irq_timer_update(s, s->count_load_time); } break; @@ -197,7 +197,7 @@ void pit_set_gate(PITState *pit, int channel, int val) case 3: if (s->gate < val) { /* restart counting on rising edge */ - s->count_load_time = qemu_get_clock(vm_clock); + s->count_load_time = qemu_get_clock_ns(vm_clock); pit_irq_timer_update(s, s->count_load_time); } /* XXX: disable/enable counting */ @@ -228,7 +228,7 @@ static inline void pit_load_count(PITChannelState *s, int val) { if (val == 0) val = 0x10000; - s->count_load_time = qemu_get_clock(vm_clock); + s->count_load_time = qemu_get_clock_ns(vm_clock); s->count = val; pit_irq_timer_update(s, s->count_load_time); } @@ -262,7 +262,7 @@ static void pit_ioport_write(void *opaque, uint32_t addr, uint32_t val) if (!(val & 0x10) && !s->status_latched) { /* status latch */ /* XXX: add BCD and null count */ - s->status = (pit_get_out1(s, qemu_get_clock(vm_clock)) << 7) | + s->status = (pit_get_out1(s, qemu_get_clock_ns(vm_clock)) << 7) | (s->rw_mode << 4) | (s->mode << 1) | s->bcd; @@ -492,7 +492,7 @@ PITState *pit_init(int base, qemu_irq irq) s = &pit->channels[0]; /* the timer 0 is connected to an IRQ */ - s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s); + s->irq_timer = qemu_new_timer_ns(vm_clock, pit_irq_timer, s); s->irq = irq; register_savevm("i8254", base, 1, pit_save, pit_load, pit); |