summaryrefslogtreecommitdiffstats
path: root/hw/tusb6010.c
diff options
context:
space:
mode:
authorJuan Quintela2009-09-10 03:04:26 +0200
committerAnthony Liguori2009-09-11 17:19:52 +0200
commit6ee093c90761eabfc6255624000d3d8248802209 (patch)
treef550274a05a1cd7a379f3e4d1cb7789fb2e64b8c /hw/tusb6010.c
parenttimers: remove useless check (diff)
downloadqemu-6ee093c90761eabfc6255624000d3d8248802209.tar.gz
qemu-6ee093c90761eabfc6255624000d3d8248802209.tar.xz
qemu-6ee093c90761eabfc6255624000d3d8248802209.zip
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/tusb6010.c')
-rw-r--r--hw/tusb6010.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/tusb6010.c b/hw/tusb6010.c
index 1ed9d4c08e..3887233339 100644
--- a/hw/tusb6010.c
+++ b/hw/tusb6010.c
@@ -523,7 +523,7 @@ static void tusb_async_writew(void *opaque, target_phys_addr_t addr,
if (value & TUSB_DEV_OTG_TIMER_ENABLE)
qemu_mod_timer(s->otg_timer, qemu_get_clock(vm_clock) +
muldiv64(TUSB_DEV_OTG_TIMER_VAL(value),
- ticks_per_sec, TUSB_DEVCLOCK));
+ get_ticks_per_sec(), TUSB_DEVCLOCK));
else
qemu_del_timer(s->otg_timer);
break;
@@ -763,6 +763,6 @@ void tusb6010_power(TUSBState *s, int on)
s->intr_ok = 0;
tusb_intr_update(s);
qemu_mod_timer(s->pwr_timer,
- qemu_get_clock(vm_clock) + ticks_per_sec / 2);
+ qemu_get_clock(vm_clock) + get_ticks_per_sec() / 2);
}
}