On 8/28/20 9:19 PM, Sai Pavan Boddu wrote: > 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.bo...@xilinx.com> > --- > hw/usb/Kconfig | 5 +++ > hw/usb/Makefile.objs | 1 + > hw/usb/hcd-xhci-sysbus.c | 99 > ++++++++++++++++++++++++++++++++++++++++++++++++ > hw/usb/hcd-xhci-sysbus.h | 32 ++++++++++++++++
Please consider using scripts/git.orderfile to ease review (less scrolling required by reviewer). > hw/usb/hcd-xhci.h | 1 + > 5 files changed, 138 insertions(+) ... > diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c > new file mode 100644 > index 0000000..d5b4656 > --- /dev/null > +++ b/hw/usb/hcd-xhci-sysbus.c > @@ -0,0 +1,99 @@ > +/* > + * USB xHCI controller for system-bus interface > + * Based on hcd-echi-sysbus.c > + > + * SPDX-FileCopyrightText: 2020 Xilinx > + * SPDX-FileContributor: Author: Sai Pavan Boddu <sai.pavan.bo...@xilinx.com> > + * > + * SPDX-License-Identifier: GPL-2.0-or-later > + */ > +#include "qemu/osdep.h" > +#include "hw/qdev-properties.h" > +#include "migration/vmstate.h" > +#include "trace.h" > +#include "qapi/error.h" > +#include "hcd-xhci-sysbus.h" > +#include "hw/irq.h" > + > +static void xhci_sysbus_intr_raise(XHCIState *xhci, int n, bool level) > +{ > + XHCISysbusState *s = container_of(xhci, XHCISysbusState, xhci); > + > + qemu_set_irq(s->irq[n], level); > +} > + > +void xhci_sysbus_reset(DeviceState *dev) > +{ > + XHCISysbusState *s = XHCI_SYSBUS(dev); > + > + device_legacy_reset(DEVICE(&s->xhci)); Documentation comment: "This function is deprecated and will be removed when it becomes unused. Please use device_cold_reset() now." > +} > +