From d3ba1f3fdf7a7d997d8b06919b7ee8f1ece0e8fb Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Sat, 7 Apr 2012 01:35:35 +0900 Subject: [PATCH] [Title] modified usb FRAME_TIMER_FREQ [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- hw/usb-uhci.c | 23 +++++++++++++++++++++++ tizen/src/skin/maruskin_operation.c | 2 ++ 2 files changed, 25 insertions(+) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 7c02042..660c733 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -33,6 +33,11 @@ #include "iov.h" #include "dma.h" +#ifdef CONFIG_MARU +#include "kvm.h" +#include "hax.h" +#endif + //#define DEBUG //#define DEBUG_DUMP_DATA @@ -429,8 +434,18 @@ static void uhci_ioport_writew(void *opaque, uint32_t addr, uint32_t val) case 0x00: if ((val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) { /* start frame processing */ +#ifdef CONFIG_MARU + if (kvm_enabled() || hax_enabled()) { //kvm or haxm machine + s->expire_time = qemu_get_clock_ns(vm_clock) + + (get_ticks_per_sec() / FRAME_TIMER_FREQ); + } else { + s->expire_time = qemu_get_clock_ns(vm_clock) + + (get_ticks_per_sec() / (FRAME_TIMER_FREQ / 2)); + } +#else s->expire_time = qemu_get_clock_ns(vm_clock) + (get_ticks_per_sec() / FRAME_TIMER_FREQ); +#endif qemu_mod_timer(s->frame_timer, qemu_get_clock_ns(vm_clock)); s->status &= ~UHCI_STS_HCHALTED; } else if (!(val & UHCI_CMD_RS)) { @@ -1063,7 +1078,15 @@ static void uhci_frame_timer(void *opaque) UHCIState *s = opaque; /* prepare the timer for the next frame */ +#ifdef CONFIG_MARU + if (kvm_enabled() || hax_enabled()) { //kvm or haxm machine + s->expire_time += (get_ticks_per_sec() / FRAME_TIMER_FREQ); + } else { + s->expire_time += (get_ticks_per_sec() / (FRAME_TIMER_FREQ / 2)); + } +#else s->expire_time += (get_ticks_per_sec() / FRAME_TIMER_FREQ); +#endif if (!(s->cmd & UHCI_CMD_RS)) { /* Full stop */ diff --git a/tizen/src/skin/maruskin_operation.c b/tizen/src/skin/maruskin_operation.c index 8c9f97e..6a346d6 100644 --- a/tizen/src/skin/maruskin_operation.c +++ b/tizen/src/skin/maruskin_operation.c @@ -81,11 +81,13 @@ void do_mouse_event( int event_type, int x, int y, int z ) ERR( "undefined mouse event type:%d\n", event_type ); } +#if 0 #ifdef _WIN32 Sleep(1); #else usleep(1000); #endif +#endif } void do_key_event( int event_type, int keycode, int key_location ) -- 2.7.4