From: Anthony Liguori Date: Wed, 22 Jun 2011 12:11:09 +0000 (-0500) Subject: Merge remote-tracking branch 'mst/for_anthony' into staging X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fdba9594df8eb2e2ac16bba95308e4159ffbb9e4;p=qemu.git Merge remote-tracking branch 'mst/for_anthony' into staging Conflicts: hw/usb-uhci.c --- fdba9594df8eb2e2ac16bba95308e4159ffbb9e4 diff --cc hw/piix_pci.c index 3e2698d998,e0da0bdf91..26ce90451a --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@@ -465,6 -452,18 +453,10 @@@ static PCIDeviceInfo i440fx_info[] = .no_hotplug = 1, .init = i440fx_initfn, .config_write = i440fx_write_config, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82441, + .revision = 0x02, + .class_id = PCI_CLASS_BRIDGE_HOST, - },{ - .qdev.name = "i440FX-xen", - .qdev.desc = "Host bridge", - .qdev.size = sizeof(PCII440FXState), - .qdev.vmsd = &vmstate_i440fx, - .qdev.no_user = 1, - .init = i440fx_initfn, - .config_write = i440fx_write_config_xen, },{ .qdev.name = "PIIX3", .qdev.desc = "ISA bridge", @@@ -474,15 -473,9 +466,18 @@@ .no_hotplug = 1, .init = piix3_initfn, .config_write = piix3_write_config, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3 PCI-to-ISA bridge (Step A1) + .class_id = PCI_CLASS_BRIDGE_ISA, + },{ + .qdev.name = "PIIX3-xen", + .qdev.desc = "ISA bridge", + .qdev.size = sizeof(PIIX3State), + .qdev.vmsd = &vmstate_piix3, + .qdev.no_user = 1, + .no_hotplug = 1, + .init = piix3_initfn, + .config_write = piix3_write_config_xen, },{ /* end of list */ } diff --cc hw/usb-uhci.c index 75cd231f81,872a995575..405fa7b65e --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@@ -1110,23 -1088,18 +1110,22 @@@ static USBPortOps uhci_port_ops = .complete = uhci_async_complete, }; +static USBBusOps uhci_bus_ops = { + .device_destroy = uhci_device_destroy, +}; + - static int usb_uhci_common_initfn(UHCIState *s) + static int usb_uhci_common_initfn(PCIDevice *dev) { + UHCIState *s = DO_UPCAST(UHCIState, dev, dev); uint8_t *pci_conf = s->dev.config; int i; - pci_conf[PCI_REVISION_ID] = 0x01; // revision number pci_conf[PCI_CLASS_PROG] = 0x00; - pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB); /* TODO: reset value should be 0. */ pci_conf[PCI_INTERRUPT_PIN] = 4; // interrupt pin 3 - pci_conf[0x60] = 0x10; // release number + pci_conf[USB_SBRN] = USB_RELEASE_1; // release number - usb_bus_new(&s->bus, &s->dev.qdev); + usb_bus_new(&s->bus, &uhci_bus_ops, &s->dev.qdev); for(i = 0; i < NB_PORTS; i++) { usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops, USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);