1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22#include "qemu/osdep.h"
23#include "hw/hw.h"
24#include "hw/usb.h"
25#include "qemu/module.h"
26#include "hw/pci/pci.h"
27
28#include "hcd-xhci.h"
29
30static Property nec_xhci_properties[] = {
31 DEFINE_PROP_ON_OFF_AUTO("msi", XHCIState, msi, ON_OFF_AUTO_AUTO),
32 DEFINE_PROP_ON_OFF_AUTO("msix", XHCIState, msix, ON_OFF_AUTO_AUTO),
33 DEFINE_PROP_BIT("superspeed-ports-first",
34 XHCIState, flags, XHCI_FLAG_SS_FIRST, true),
35 DEFINE_PROP_BIT("force-pcie-endcap", XHCIState, flags,
36 XHCI_FLAG_FORCE_PCIE_ENDCAP, false),
37 DEFINE_PROP_UINT32("intrs", XHCIState, numintrs, MAXINTRS),
38 DEFINE_PROP_UINT32("slots", XHCIState, numslots, MAXSLOTS),
39 DEFINE_PROP_END_OF_LIST(),
40};
41
42static void nec_xhci_class_init(ObjectClass *klass, void *data)
43{
44 PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
45 DeviceClass *dc = DEVICE_CLASS(klass);
46
47 dc->props = nec_xhci_properties;
48 k->vendor_id = PCI_VENDOR_ID_NEC;
49 k->device_id = PCI_DEVICE_ID_NEC_UPD720200;
50 k->revision = 0x03;
51}
52
53static const TypeInfo nec_xhci_info = {
54 .name = TYPE_NEC_XHCI,
55 .parent = TYPE_XHCI,
56 .class_init = nec_xhci_class_init,
57};
58
59static void nec_xhci_register_types(void)
60{
61 type_register_static(&nec_xhci_info);
62}
63
64type_init(nec_xhci_register_types)
65