|
@@ -23,7 +23,6 @@
|
|
#include "qemu/timer.h"
|
|
#include "qemu/timer.h"
|
|
#include "qemu/module.h"
|
|
#include "qemu/module.h"
|
|
#include "qemu/queue.h"
|
|
#include "qemu/queue.h"
|
|
-#include "hw/usb.h"
|
|
|
|
#include "migration/vmstate.h"
|
|
#include "migration/vmstate.h"
|
|
#include "hw/pci/pci.h"
|
|
#include "hw/pci/pci.h"
|
|
#include "hw/qdev-properties.h"
|
|
#include "hw/qdev-properties.h"
|
|
@@ -429,12 +428,12 @@ static const char *ep_state_name(uint32_t state)
|
|
ARRAY_SIZE(ep_state_names));
|
|
ARRAY_SIZE(ep_state_names));
|
|
}
|
|
}
|
|
|
|
|
|
-static bool xhci_get_flag(XHCIState *xhci, enum xhci_flags bit)
|
|
|
|
|
|
+bool xhci_get_flag(XHCIState *xhci, enum xhci_flags bit)
|
|
{
|
|
{
|
|
return xhci->flags & (1 << bit);
|
|
return xhci->flags & (1 << bit);
|
|
}
|
|
}
|
|
|
|
|
|
-static void xhci_set_flag(XHCIState *xhci, enum xhci_flags bit)
|
|
|
|
|
|
+void xhci_set_flag(XHCIState *xhci, enum xhci_flags bit)
|
|
{
|
|
{
|
|
xhci->flags |= (1 << bit);
|
|
xhci->flags |= (1 << bit);
|
|
}
|
|
}
|
|
@@ -3730,37 +3729,9 @@ static const TypeInfo xhci_info = {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
|
|
-static void qemu_xhci_class_init(ObjectClass *klass, void *data)
|
|
|
|
-{
|
|
|
|
- PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
|
|
|
-
|
|
|
|
- k->vendor_id = PCI_VENDOR_ID_REDHAT;
|
|
|
|
- k->device_id = PCI_DEVICE_ID_REDHAT_XHCI;
|
|
|
|
- k->revision = 0x01;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void qemu_xhci_instance_init(Object *obj)
|
|
|
|
-{
|
|
|
|
- XHCIState *xhci = XHCI(obj);
|
|
|
|
-
|
|
|
|
- xhci->msi = ON_OFF_AUTO_OFF;
|
|
|
|
- xhci->msix = ON_OFF_AUTO_AUTO;
|
|
|
|
- xhci->numintrs = MAXINTRS;
|
|
|
|
- xhci->numslots = MAXSLOTS;
|
|
|
|
- xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static const TypeInfo qemu_xhci_info = {
|
|
|
|
- .name = TYPE_QEMU_XHCI,
|
|
|
|
- .parent = TYPE_XHCI,
|
|
|
|
- .class_init = qemu_xhci_class_init,
|
|
|
|
- .instance_init = qemu_xhci_instance_init,
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
static void xhci_register_types(void)
|
|
static void xhci_register_types(void)
|
|
{
|
|
{
|
|
type_register_static(&xhci_info);
|
|
type_register_static(&xhci_info);
|
|
- type_register_static(&qemu_xhci_info);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
type_init(xhci_register_types)
|
|
type_init(xhci_register_types)
|