Commit 52328140e2892c0f7033f6857f1a96da1680bf79
1 parent
135e73c5
HCHALTED status bit handling (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1850 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
0 deletions
hw/usb-uhci.c
@@ -174,6 +174,9 @@ static void uhci_ioport_writew(void *opaque, uint32_t addr, uint32_t val) | @@ -174,6 +174,9 @@ static void uhci_ioport_writew(void *opaque, uint32_t addr, uint32_t val) | ||
174 | if ((val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) { | 174 | if ((val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) { |
175 | /* start frame processing */ | 175 | /* start frame processing */ |
176 | qemu_mod_timer(s->frame_timer, qemu_get_clock(vm_clock)); | 176 | qemu_mod_timer(s->frame_timer, qemu_get_clock(vm_clock)); |
177 | + s->status &= ~UHCI_STS_HCHALTED; | ||
178 | + } else if (!(val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) { | ||
179 | + s->status |= UHCI_STS_HCHALTED; | ||
177 | } | 180 | } |
178 | if (val & UHCI_CMD_GRESET) { | 181 | if (val & UHCI_CMD_GRESET) { |
179 | UHCIPort *port; | 182 | UHCIPort *port; |
@@ -528,6 +531,8 @@ static void uhci_frame_timer(void *opaque) | @@ -528,6 +531,8 @@ static void uhci_frame_timer(void *opaque) | ||
528 | 531 | ||
529 | if (!(s->cmd & UHCI_CMD_RS)) { | 532 | if (!(s->cmd & UHCI_CMD_RS)) { |
530 | qemu_del_timer(s->frame_timer); | 533 | qemu_del_timer(s->frame_timer); |
534 | + /* set hchalted bit in status - UHCI11D 2.1.2 */ | ||
535 | + s->status |= UHCI_STS_HCHALTED; | ||
531 | return; | 536 | return; |
532 | } | 537 | } |
533 | frame_addr = s->fl_base_addr + ((s->frnum & 0x3ff) << 2); | 538 | frame_addr = s->fl_base_addr + ((s->frnum & 0x3ff) << 2); |