vt82c686-uhci-pci.c (1133B)
1#include "qemu/osdep.h" 2#include "hcd-uhci.h" 3 4static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp) 5{ 6 UHCIState *s = UHCI(dev); 7 uint8_t *pci_conf = s->dev.config; 8 9 /* USB misc control 1/2 */ 10 pci_set_long(pci_conf + 0x40, 0x00001000); 11 /* PM capability */ 12 pci_set_long(pci_conf + 0x80, 0x00020001); 13 /* USB legacy support */ 14 pci_set_long(pci_conf + 0xc0, 0x00002000); 15 16 usb_uhci_common_realize(dev, errp); 17} 18 19static UHCIInfo uhci_info[] = { 20 { 21 .name = "vt82c686b-usb-uhci", 22 .vendor_id = PCI_VENDOR_ID_VIA, 23 .device_id = PCI_DEVICE_ID_VIA_UHCI, 24 .revision = 0x01, 25 .irq_pin = 3, 26 .realize = usb_uhci_vt82c686b_realize, 27 .unplug = true, 28 } 29}; 30 31static const TypeInfo vt82c686b_usb_uhci_type_info = { 32 .parent = TYPE_UHCI, 33 .name = "vt82c686b-usb-uhci", 34 .class_init = uhci_data_class_init, 35 .class_data = uhci_info, 36}; 37 38static void vt82c686b_usb_uhci_register_types(void) 39{ 40 type_register_static(&vt82c686b_usb_uhci_type_info); 41} 42 43type_init(vt82c686b_usb_uhci_register_types)