aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-uhci.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-21 16:30:15 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-21 16:30:15 +0000
commit0d92ed3022694aa6ec9172938e999871fa04f711 (patch)
tree21a55018bcee0a0bbb8031431ca45b1c87a433b5 /hw/usb-uhci.c
parent6650ee6d3365d7f246cd7a6523c15fb542fc6032 (diff)
downloadqemu-0d92ed3022694aa6ec9172938e999871fa04f711.zip
qemu-0d92ed3022694aa6ec9172938e999871fa04f711.tar.gz
qemu-0d92ed3022694aa6ec9172938e999871fa04f711.tar.bz2
OHCI USB host emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1928 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r--hw/usb-uhci.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index a18833d..d3358fe 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -638,11 +638,10 @@ static void uhci_map(PCIDevice *pci_dev, int region_num,
register_ioport_read(addr, 32, 1, uhci_ioport_readb, s);
}
-void usb_uhci_init(PCIBus *bus, USBPort **usb_ports, int devfn)
+void usb_uhci_init(PCIBus *bus, int devfn)
{
UHCIState *s;
uint8_t *pci_conf;
- UHCIPort *port;
int i;
s = (UHCIState *)pci_register_device(bus,
@@ -662,11 +661,7 @@ void usb_uhci_init(PCIBus *bus, USBPort **usb_ports, int devfn)
pci_conf[0x60] = 0x10; // release number
for(i = 0; i < NB_PORTS; i++) {
- port = &s->ports[i];
- port->port.opaque = s;
- port->port.index = i;
- port->port.attach = uhci_attach;
- usb_ports[i] = &port->port;
+ qemu_register_usb_port(&s->ports[i].port, s, i, uhci_attach);
}
s->frame_timer = qemu_new_timer(vm_clock, uhci_frame_timer, s);