From: Gerd Hoffmann Date: Thu, 30 Aug 2012 12:04:04 +0000 (+0200) Subject: xhci: move register update into xhci_intr_raise X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~3579^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cae41195b5b95129d92a189a0bfce3e5d0d8707;p=sdk%2Femulator%2Fqemu.git xhci: move register update into xhci_intr_raise Now that we have a separate function to raise an IRQ we can move some comon code into the function. Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 19bbb16..8dc9986 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -662,8 +662,11 @@ static void xhci_msix_update(XHCIState *xhci) static void xhci_intr_raise(XHCIState *xhci) { - if (!(xhci->iman & IMAN_IP) || - !(xhci->iman & IMAN_IE)) { + xhci->erdp_low |= ERDP_EHB; + xhci->iman |= IMAN_IP; + xhci->usbsts |= USBSTS_EINT; + + if (!(xhci->iman & IMAN_IE)) { return; } @@ -784,9 +787,6 @@ static void xhci_events_update(XHCIState *xhci) } if (do_irq) { - xhci->erdp_low |= ERDP_EHB; - xhci->iman |= IMAN_IP; - xhci->usbsts |= USBSTS_EINT; xhci_intr_raise(xhci); } @@ -847,10 +847,6 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event) xhci_write_event(xhci, event); } - xhci->erdp_low |= ERDP_EHB; - xhci->iman |= IMAN_IP; - xhci->usbsts |= USBSTS_EINT; - xhci_intr_raise(xhci); }