hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM
[qemu/ar7.git] / hw / usb / vt82c686-uhci-pci.c
blobb109c2160335afd5063b17942ad24c334329232b
1 #include "qemu/osdep.h"
2 #include "hcd-uhci.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);
11 /* PM capability */
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,
24 .revision = 0x01,
25 .irq_pin = 3,
26 .realize = usb_uhci_vt82c686b_realize,
27 .unplug = true,
31 static 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,
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)