aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-xhci.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/hcd-xhci.h')
-rw-r--r--hw/usb/hcd-xhci.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index f859a17..ccf50ae 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -24,23 +24,13 @@
#include "qom/object.h"
#include "hw/usb.h"
+#include "hw/usb/xhci.h"
#include "sysemu/dma.h"
-#define TYPE_XHCI "base-xhci"
-#define TYPE_NEC_XHCI "nec-usb-xhci"
-#define TYPE_QEMU_XHCI "qemu-xhci"
-
OBJECT_DECLARE_SIMPLE_TYPE(XHCIState, XHCI)
-#define MAXPORTS_2 15
-#define MAXPORTS_3 15
-
-#define MAXPORTS (MAXPORTS_2 + MAXPORTS_3)
-#define MAXSLOTS 64
-#define MAXINTRS 16
-
/* Very pessimistic, let's hope it's enough for all cases */
-#define EV_QUEUE (((3 * 24) + 16) * MAXSLOTS)
+#define EV_QUEUE (((3 * 24) + 16) * XHCI_MAXSLOTS)
typedef struct XHCIStreamContext XHCIStreamContext;
typedef struct XHCIEPContext XHCIEPContext;
@@ -217,15 +207,15 @@ typedef struct XHCIState {
uint32_t dcbaap_high;
uint32_t config;
- USBPort uports[MAX_CONST(MAXPORTS_2, MAXPORTS_3)];
- XHCIPort ports[MAXPORTS];
- XHCISlot slots[MAXSLOTS];
+ USBPort uports[MAX_CONST(XHCI_MAXPORTS_2, XHCI_MAXPORTS_3)];
+ XHCIPort ports[XHCI_MAXPORTS];
+ XHCISlot slots[XHCI_MAXSLOTS];
uint32_t numports;
/* Runtime Registers */
int64_t mfindex_start;
QEMUTimer *mfwrap_timer;
- XHCIInterrupter intr[MAXINTRS];
+ XHCIInterrupter intr[XHCI_MAXINTRS];
XHCIRing cmd_ring;