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 "hw/pci/pci.h"
26
27#include "hcd-xhci.h"
28
29static Property nec_xhci_properties[] = {
30 DEFINE_PROP_ON_OFF_AUTO("msi", XHCIState, msi, ON_OFF_AUTO_AUTO),
31 DEFINE_PROP_ON_OFF_AUTO("msix", XHCIState, msix, ON_OFF_AUTO_AUTO),
32 DEFINE_PROP_BIT("superspeed-ports-first",
33 XHCIState, flags, XHCI_FLAG_SS_FIRST, true),
34 DEFINE_PROP_BIT("force-pcie-endcap", XHCIState, flags,
35 XHCI_FLAG_FORCE_PCIE_ENDCAP, false),
36 DEFINE_PROP_UINT32("intrs", XHCIState, numintrs, MAXINTRS),
37 DEFINE_PROP_UINT32("slots", XHCIState, numslots, MAXSLOTS),
38 DEFINE_PROP_END_OF_LIST(),
39};
40
41static void nec_xhci_class_init(ObjectClass *klass, void *data)
42{
43 PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
44 DeviceClass *dc = DEVICE_CLASS(klass);
45
46 dc->props = nec_xhci_properties;
47 k->vendor_id = PCI_VENDOR_ID_NEC;
48 k->device_id = PCI_DEVICE_ID_NEC_UPD720200;
49 k->revision = 0x03;
50}
51
52static const TypeInfo nec_xhci_info = {
53 .name = TYPE_NEC_XHCI,
54 .parent = TYPE_XHCI,
55 .class_init = nec_xhci_class_init,
56};
57
58static void nec_xhci_register_types(void)
59{
60 type_register_static(&nec_xhci_info);
61}
62
63type_init(nec_xhci_register_types)
64