block: Mark bdrv_replace_child_noperm() GRAPH_WRLOCK
[qemu/kevin.git] / hw / usb / vt82c686-uhci-pci.c
blobb4884c9011cf8803b9c08528dd5b061f808c4c0b
1 #include "qemu/osdep.h"
2 #include "hw/isa/vt82c686.h"
3 #include "hcd-uhci.h"
5 static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp)
7 UHCIState *s = UHCI(dev);
8 uint8_t *pci_conf = s->dev.config;
10 /* USB misc control 1/2 */
11 pci_set_long(pci_conf + 0x40, 0x00001000);
12 /* PM capability */
13 pci_set_long(pci_conf + 0x80, 0x00020001);
14 /* USB legacy support */
15 pci_set_long(pci_conf + 0xc0, 0x00002000);
17 usb_uhci_common_realize(dev, errp);
20 static UHCIInfo uhci_info[] = {
22 .name = TYPE_VT82C686B_USB_UHCI,
23 .vendor_id = PCI_VENDOR_ID_VIA,
24 .device_id = PCI_DEVICE_ID_VIA_UHCI,
25 .revision = 0x01,
26 .irq_pin = 3,
27 .realize = usb_uhci_vt82c686b_realize,
28 .unplug = true,
29 /* Reason: only works as USB function of VT82xx superio chips */
30 .notuser = true,
34 static const TypeInfo vt82c686b_usb_uhci_type_info = {
35 .parent = TYPE_UHCI,
36 .name = TYPE_VT82C686B_USB_UHCI,
37 .class_init = uhci_data_class_init,
38 .class_data = uhci_info,
41 static void vt82c686b_usb_uhci_register_types(void)
43 type_register_static(&vt82c686b_usb_uhci_type_info);
46 type_init(vt82c686b_usb_uhci_register_types)