summaryrefslogtreecommitdiffstats
path: root/hw/usb.h
diff options
context:
space:
mode:
authorpbrook2006-05-21 18:30:15 +0200
committerpbrook2006-05-21 18:30:15 +0200
commit0d92ed3022694aa6ec9172938e999871fa04f711 (patch)
tree21a55018bcee0a0bbb8031431ca45b1c87a433b5 /hw/usb.h
parentUse lookup table for PCI class descriptions. (diff)
downloadqemu-0d92ed3022694aa6ec9172938e999871fa04f711.tar.gz
qemu-0d92ed3022694aa6ec9172938e999871fa04f711.tar.xz
qemu-0d92ed3022694aa6ec9172938e999871fa04f711.zip
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.h')
-rw-r--r--hw/usb.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/usb.h b/hw/usb.h
index cb654e000c..c92fd01b9e 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -137,12 +137,15 @@ struct USBDevice {
int setup_index;
};
+typedef void (*usb_attachfn)(USBPort *port, USBDevice *dev);
+
/* USB port on which a device can be connected */
struct USBPort {
USBDevice *dev;
- void (*attach)(USBPort *port, USBDevice *dev);
+ usb_attachfn attach;
void *opaque;
int index; /* internal port index, may be used with the opaque */
+ struct USBPort *next; /* Used internally by qemu. */
};
void usb_attach(USBPort *port, USBDevice *dev);
@@ -152,10 +155,13 @@ int usb_generic_handle_packet(USBDevice *s, int pid,
int set_usb_string(uint8_t *buf, const char *str);
/* usb hub */
-USBDevice *usb_hub_init(USBPort **usb_ports, int nb_ports);
+USBDevice *usb_hub_init(int nb_ports);
/* usb-uhci.c */
-void usb_uhci_init(PCIBus *bus, USBPort **usb_ports, int devfn);
+void usb_uhci_init(PCIBus *bus, int devfn);
+
+/* usb-ohci.c */
+void usb_ohci_init(struct PCIBus *bus, int num_ports, int devfn);
/* usb-linux.c */
USBDevice *usb_host_device_open(const char *devname);