[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 4/7] usb: hcd-xhci-sysbus: Attach xhci to sysbus device
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v4 4/7] usb: hcd-xhci-sysbus: Attach xhci to sysbus device |
Date: |
Tue, 1 Sep 2020 18:42:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
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.boddu@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.boddu@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."
> +}
> +
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v4 4/7] usb: hcd-xhci-sysbus: Attach xhci to sysbus device,
Philippe Mathieu-Daudé <=