1 #include "qemu/osdep.h"
4 static void usb_uhci_vt82c686b_realize(PCIDevice
*dev
, Error
**errp
)
6 UHCIState
*s
= UHCI(dev
);
7 uint8_t *pci_conf
= s
->dev
.config
;
9 /* USB misc control 1/2 */
10 pci_set_long(pci_conf
+ 0x40, 0x00001000);
12 pci_set_long(pci_conf
+ 0x80, 0x00020001);
13 /* USB legacy support */
14 pci_set_long(pci_conf
+ 0xc0, 0x00002000);
16 usb_uhci_common_realize(dev
, errp
);
19 static UHCIInfo uhci_info
[] = {
21 .name
= "vt82c686b-usb-uhci",
22 .vendor_id
= PCI_VENDOR_ID_VIA
,
23 .device_id
= PCI_DEVICE_ID_VIA_UHCI
,
26 .realize
= usb_uhci_vt82c686b_realize
,
31 static const TypeInfo vt82c686b_usb_uhci_type_info
= {
33 .name
= "vt82c686b-usb-uhci",
34 .class_init
= uhci_data_class_init
,
35 .class_data
= uhci_info
,
38 static void vt82c686b_usb_uhci_register_types(void)
40 type_register_static(&vt82c686b_usb_uhci_type_info
);
43 type_init(vt82c686b_usb_uhci_register_types
)