diff options
author | Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> | 2020-09-24 19:50:53 +0530 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-28 12:40:11 +0200 |
commit | f00ff136eee50b1450f9b47ae35df3ca6b9bcfb8 (patch) | |
tree | ba6a2dc7734d2ebe12443260b2f611e12b8abab4 /hw/usb/hcd-xhci-sysbus.h | |
parent | 8ddab8dd3d81a3500f2831378dde589f8602cb63 (diff) |
usb: hcd-xhci-sysbus: Attach xhci to sysbus device
Use XHCI as sysbus device, add memory region property to get the
address space instance for dma read/write.
Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Message-id: 1600957256-6494-5-git-send-email-sai.pavan.boddu@xilinx.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-xhci-sysbus.h')
-rw-r--r-- | hw/usb/hcd-xhci-sysbus.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/hw/usb/hcd-xhci-sysbus.h b/hw/usb/hcd-xhci-sysbus.h new file mode 100644 index 0000000000..a308753ceb --- /dev/null +++ b/hw/usb/hcd-xhci-sysbus.h @@ -0,0 +1,32 @@ +/* + * USB xHCI controller for system-bus interface + * + * SPDX-FileCopyrightText: 2020 Xilinx + * SPDX-FileContributor: Author: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> + * SPDX-sourceInfo: Based on hcd-echi-sysbus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef HW_USB_HCD_XHCI_SYSBUS_H +#define HW_USB_HCD_XHCI_SYSBUS_H + +#include "hw/usb.h" +#include "hcd-xhci.h" +#include "hw/sysbus.h" + +#define TYPE_XHCI_SYSBUS "sysbus-xhci" +#define XHCI_SYSBUS(obj) \ + OBJECT_CHECK(XHCISysbusState, (obj), TYPE_XHCI_SYSBUS) + + +typedef struct XHCISysbusState { + /*< private >*/ + SysBusDevice parent_obj; + /*< public >*/ + XHCIState xhci; + qemu_irq *irq; +} XHCISysbusState; + +void xhci_sysbus_reset(DeviceState *dev); +#endif |