X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=hw%2Fusb%2Ftusb6010.c;h=8f593a6fdbd4fdaf2a30ac0235e6e4730afae66d;hb=73bcb24d932912f8e75e1d88da0fc0ac6d4bce78;hp=9f6af90806e16798c5fa3ff8cc7143238562e2ab;hpb=4771d756f46219762477aaeaaef9bd215e3d5c60;p=mirror_qemu.git diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 9f6af90806..8f593a6fdb 100644 --- a/hw/usb/tusb6010.c +++ b/hw/usb/tusb6010.c @@ -516,7 +516,7 @@ static void tusb_async_writew(void *opaque, hwaddr addr, if (value & TUSB_DEV_OTG_TIMER_ENABLE) timer_mod(s->otg_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + muldiv64(TUSB_DEV_OTG_TIMER_VAL(value), - get_ticks_per_sec(), TUSB_DEVCLOCK)); + NANOSECONDS_PER_SECOND, TUSB_DEVCLOCK)); else timer_del(s->otg_timer); break; @@ -726,8 +726,8 @@ static void tusb6010_power(TUSBState *s, int on) /* Pull the interrupt down after TUSB6010 comes up. */ s->intr_ok = 0; tusb_intr_update(s); - timer_mod(s->pwr_timer, - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + get_ticks_per_sec() / 2); + timer_mod(s->pwr_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + + NANOSECONDS_PER_SECOND / 2); } }