aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-xhci.h
diff options
context:
space:
mode:
authorSai Pavan Boddu <sai.pavan.boddu@xilinx.com>2020-09-24 19:50:52 +0530
committerGerd Hoffmann <kraxel@redhat.com>2020-09-28 12:40:11 +0200
commit8ddab8dd3d81a3500f2831378dde589f8602cb63 (patch)
treeb58e27d766571676733e673971bbe4f3994b84aa /hw/usb/hcd-xhci.h
parent755fba11fbcadb4ba27700a99f29ebdf9bb63c51 (diff)
usb/hcd-xhci: Split pci wrapper for xhci base model
This patch sets the base to use xhci as sysbus model, for which pci specific hooks are moved to hcd-xhci-pci.c. As a part of this requirment msi/msix interrupts handling is moved under XHCIPCIState. Made required changes for qemu-xhci-nec. Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> Message-id: 1600957256-6494-4-git-send-email-sai.pavan.boddu@xilinx.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-xhci.h')
-rw-r--r--hw/usb/hcd-xhci.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index effd46cea6..0040c271d6 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -24,6 +24,7 @@
#include "qom/object.h"
#include "hw/usb.h"
+#include "sysemu/dma.h"
#define TYPE_XHCI "base-xhci"
#define TYPE_NEC_XHCI "nec-usb-xhci"
@@ -183,10 +184,8 @@ typedef struct XHCIInterrupter {
} XHCIInterrupter;
-struct XHCIState {
- /*< private >*/
- PCIDevice parent_obj;
- /*< public >*/
+typedef struct XHCIState {
+ DeviceState parent;
USBBus bus;
MemoryRegion mem;
@@ -203,8 +202,9 @@ struct XHCIState {
uint32_t numslots;
uint32_t flags;
uint32_t max_pstreams_mask;
- OnOffAuto msi;
- OnOffAuto msix;
+ void (*intr_update)(XHCIState *s, int n, bool enable);
+ void (*intr_raise)(XHCIState *s, int n, bool level);
+ DeviceState *hostOpaque;
/* Operational Registers */
uint32_t usbcmd;
@@ -229,8 +229,9 @@ struct XHCIState {
XHCIRing cmd_ring;
bool nec_quirks;
-};
+} XHCIState;
+extern const VMStateDescription vmstate_xhci;
bool xhci_get_flag(XHCIState *xhci, enum xhci_flags bit);
void xhci_set_flag(XHCIState *xhci, enum xhci_flags bit);
#endif