summaryrefslogtreecommitdiff
path: root/hw/usb-ohci.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-08-31 14:24:00 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-09 14:55:17 -0500
commita5d2f7273c4f59942cc7ffa763d6b60a6f44e908 (patch)
tree58aa343b12e77313bc708d3166a9bc609039d40c /hw/usb-ohci.c
parent806b60248218bd5f74a8b070f5a99a864e8e51c6 (diff)
downloadqemu-a5d2f7273c4f59942cc7ffa763d6b60a6f44e908.tar.gz
qdev/usb: make qemu aware of usb busses.
Move usb code from vl.c to usb-bus.c and make it use the new data structures added by qdev conversion. qemu usb core should be able to handle multiple USB busses just fine now (untested though). Kill some usb_*_init() legacy functions, use usb_create_simple() instead. Kill some FIXMEs added by the first qdev/usb patch. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb-ohci.c')
-rw-r--r--hw/usb-ohci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index e725e974b2..7f620c7d21 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -65,6 +65,7 @@ enum ohci_type {
};
typedef struct {
+ USBBus *bus;
qemu_irq irq;
enum ohci_type type;
int mem;
@@ -1688,9 +1689,10 @@ static void usb_ohci_init(OHCIState *ohci, int num_ports, int devfn,
ohci->irq = irq;
ohci->type = type;
+ ohci->bus = usb_bus_new(NULL /* FIXME */);
ohci->num_ports = num_ports;
for (i = 0; i < num_ports; i++) {
- qemu_register_usb_port(&ohci->rhport[i].port, ohci, i, ohci_attach);
+ usb_register_port(ohci->bus, &ohci->rhport[i].port, ohci, i, ohci_attach);
}
ohci->async_td = 0;