diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-10-20 09:48:36 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-10-21 11:36:19 +0200 |
commit | 848db5257db7f5a199373f3ac870893e7d770d46 (patch) | |
tree | 6acdcd7c6096fbb416c2df0c29bdf393ad668f78 /hw/usb/hcd-xhci.h | |
parent | 284e269d7ecd511084cc83d6b5ce3bca4db38f53 (diff) | |
download | qemu-848db5257db7f5a199373f3ac870893e7d770d46.zip qemu-848db5257db7f5a199373f3ac870893e7d770d46.tar.gz qemu-848db5257db7f5a199373f3ac870893e7d770d46.tar.bz2 |
usb/xhci: add include/hw/usb/xhci.h header file
Move a bunch of defines which might be needed outside core xhci
code to that place. Add XHCI_ prefixes to avoid name clashes.
No functional change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Message-id: 20201020074844.5304-3-kraxel@redhat.com
Diffstat (limited to 'hw/usb/hcd-xhci.h')
-rw-r--r-- | hw/usb/hcd-xhci.h | 22 |
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; |