1 #include "qemu/osdep.h"
2 #include "hw/isa/vt82c686.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);
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
,
27 .realize
= usb_uhci_vt82c686b_realize
,
29 /* Reason: only works as USB function of VT82xx superio chips */
34 static const TypeInfo vt82c686b_usb_uhci_type_info
= {
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
)