aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-uhci.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/hcd-uhci.h')
-rw-r--r--hw/usb/hcd-uhci.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h
index e61d8fcb19..6d26b94e92 100644
--- a/hw/usb/hcd-uhci.h
+++ b/hw/usb/hcd-uhci.h
@@ -30,12 +30,12 @@
#include "exec/memory.h"
#include "qemu/timer.h"
-#include "hw/pci/pci.h"
+#include "hw/pci/pci_device.h"
#include "hw/usb.h"
typedef struct UHCIQueue UHCIQueue;
-#define NB_PORTS 2
+#define UHCI_PORTS 2
typedef struct UHCIPort {
USBPort port;
@@ -59,8 +59,8 @@ typedef struct UHCIState {
uint32_t frame_bytes;
uint32_t frame_bandwidth;
bool completions_only;
- UHCIPort ports[NB_PORTS];
-
+ UHCIPort ports[UHCI_PORTS];
+ qemu_irq irq;
/* Interrupts that should be raised at the end of the current frame. */
uint32_t pending_int_mask;
@@ -75,7 +75,7 @@ typedef struct UHCIState {
} UHCIState;
#define TYPE_UHCI "pci-uhci-usb"
-DECLARE_INSTANCE_CHECKER(UHCIState, UHCI, TYPE_UHCI)
+OBJECT_DECLARE_TYPE(UHCIState, UHCIPCIDeviceClass, UHCI)
typedef struct UHCIInfo {
const char *name;
@@ -85,9 +85,14 @@ typedef struct UHCIInfo {
uint8_t irq_pin;
void (*realize)(PCIDevice *dev, Error **errp);
bool unplug;
+ bool notuser; /* disallow user_creatable */
} UHCIInfo;
void uhci_data_class_init(ObjectClass *klass, void *data);
void usb_uhci_common_realize(PCIDevice *dev, Error **errp);
+#define TYPE_PIIX3_USB_UHCI "piix3-usb-uhci"
+#define TYPE_PIIX4_USB_UHCI "piix4-usb-uhci"
+#define TYPE_ICH9_USB_UHCI(fn) "ich9-usb-uhci" #fn
+
#endif