diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-05-21 16:30:15 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-05-21 16:30:15 +0000 |
commit | 0d92ed3022694aa6ec9172938e999871fa04f711 (patch) | |
tree | 21a55018bcee0a0bbb8031431ca45b1c87a433b5 /hw/usb.h | |
parent | 6650ee6d3365d7f246cd7a6523c15fb542fc6032 (diff) | |
download | qemu-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.h')
-rw-r--r-- | hw/usb.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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); |