diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-05 14:22:28 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-05 14:22:28 +0000 |
commit | bb36d4708bc93874af95db54da2a9cee0d30a84d (patch) | |
tree | 5a57b4daada78670aefb208b9514fa0b47f10db9 /hw/pc.c | |
parent | 1aff381f59b508a422f6fe03965fbc3728d3c45a (diff) |
initial USB support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1597 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -620,6 +620,28 @@ 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_hub; + 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_hub = usb_hub_init(usb_hub1_ports, 4); + usb_attach(usb_root_ports[0], usb_hub); + + /* test: we simulate a USB hub */ + usb_hub = usb_hub_init(usb_hub2_ports, 2); + usb_attach(usb_hub1_ports[0], usb_hub); + } +#endif + /* simulated hub with the host USB devices connected to it */ + usb_hub = usb_host_hub_init(); + usb_attach(usb_root_ports[0], usb_hub); + } + /* must be done after all PCI devices are instanciated */ /* XXX: should be done in the Bochs BIOS */ if (pci_enabled) { |