diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-06 16:13:29 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-06 16:13:29 +0000 |
commit | a594cfbf3e1a38bc6f3908d7d0903d41e8ea9da8 (patch) | |
tree | 08a6cbb83a11db3d8c675b95cfe427dcd981ce81 /hw/pc.c | |
parent | 8738a8d079b661a612e89612844dc270ef5f0924 (diff) |
USB user interface
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1603 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 27 |
1 files changed, 2 insertions, 25 deletions
@@ -42,6 +42,7 @@ static fdctrl_t *floppy_controller; static RTCState *rtc_state; static PITState *pit; static IOAPICState *ioapic; +static USBPort *usb_root_ports[2]; static void ioport80_write(void *opaque, uint32_t addr, uint32_t data) { @@ -625,32 +626,8 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, cmos_init(ram_size, boot_device, bs_table); if (pci_enabled && usb_enabled) { - USBPort *usb_root_ports[2]; - USBDevice *usb_dev; usb_uhci_init(pci_bus, usb_root_ports); -#if 0 - { - USBPort *usb_hub1_ports[4]; - USBPort *usb_hub2_ports[2]; - /* test: we simulate a USB hub */ - usb_dev = usb_hub_init(usb_hub1_ports, 4); - usb_attach(usb_root_ports[0], usb_dev); - - /* test: we simulate a USB hub */ - usb_dev = usb_hub_init(usb_hub2_ports, 2); - usb_attach(usb_hub1_ports[0], usb_dev); - } -#endif -#if 0 - /* USB mouse */ - usb_dev = usb_mouse_init(); - usb_attach(usb_root_ports[0], usb_dev); -#endif -#if 1 - /* simulated hub with the host USB devices connected to it */ - usb_dev = usb_host_hub_init(); - usb_attach(usb_root_ports[0], usb_dev); -#endif + usb_attach(usb_root_ports[0], vm_usb_hub); } /* must be done after all PCI devices are instanciated */ |