[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 4/5] hw/usb: Add generic sys-bus EHCI controller
From: |
Hongbo Zhang |
Subject: |
Re: [Qemu-devel] [PULL 4/5] hw/usb: Add generic sys-bus EHCI controller |
Date: |
Wed, 9 Jan 2019 11:03:59 +0800 |
Thanks, Gerd.
On Tue, 8 Jan 2019 at 23:54, Gerd Hoffmann <address@hidden> wrote:
>
> From: Hongbo Zhang <address@hidden>
>
> This patch introduces a new system bus generic EHCI controller.
> For the system bus EHCI controller, we've already had "xlnx",
> "exynos4210", "tegra2", "ppc4xx" and "fusbh200", they are specific and
> only suitable for their own platforms, platforms such as an Arm server,
> may need a generic system bus EHCI controller, this patch creates it,
> and the kernel driver ehci_platform.c works well on it.
>
> Signed-off-by: Hongbo Zhang <address@hidden>
> Message-id: address@hidden
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
> hw/usb/hcd-ehci.h | 1 +
> hw/usb/hcd-ehci-sysbus.c | 17 +++++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
> index 0bc364b286..cd30b5d5e0 100644
> --- a/hw/usb/hcd-ehci.h
> +++ b/hw/usb/hcd-ehci.h
> @@ -342,6 +342,7 @@ typedef struct EHCIPCIState {
>
>
> #define TYPE_SYS_BUS_EHCI "sysbus-ehci-usb"
> +#define TYPE_PLATFORM_EHCI "platform-ehci-usb"
> #define TYPE_EXYNOS4210_EHCI "exynos4210-ehci-usb"
> #define TYPE_TEGRA2_EHCI "tegra2-ehci-usb"
> #define TYPE_PPC4xx_EHCI "ppc4xx-ehci-usb"
> diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
> index 3b83beb140..331faf8bc3 100644
> --- a/hw/usb/hcd-ehci-sysbus.c
> +++ b/hw/usb/hcd-ehci-sysbus.c
> @@ -94,6 +94,22 @@ static const TypeInfo ehci_type_info = {
> .class_size = sizeof(SysBusEHCIClass),
> };
>
> +static void ehci_platform_class_init(ObjectClass *oc, void *data)
> +{
> + SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
> + DeviceClass *dc = DEVICE_CLASS(oc);
> +
> + sec->capsbase = 0x0;
> + sec->opregbase = 0x20;
> + set_bit(DEVICE_CATEGORY_USB, dc->categories);
> +}
> +
> +static const TypeInfo ehci_platform_type_info = {
> + .name = TYPE_PLATFORM_EHCI,
> + .parent = TYPE_SYS_BUS_EHCI,
> + .class_init = ehci_platform_class_init,
> +};
> +
> static void ehci_xlnx_class_init(ObjectClass *oc, void *data)
> {
> SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
> @@ -245,6 +261,7 @@ static const TypeInfo ehci_fusbh200_type_info = {
> static void ehci_sysbus_register_types(void)
> {
> type_register_static(&ehci_type_info);
> + type_register_static(&ehci_platform_type_info);
> type_register_static(&ehci_xlnx_type_info);
> type_register_static(&ehci_exynos4210_type_info);
> type_register_static(&ehci_tegra2_type_info);
> --
> 2.9.3
>
- [Qemu-devel] [PULL 0/5] Usb 20190108 patches, Gerd Hoffmann, 2019/01/08
- [Qemu-devel] [PULL 3/5] usb: dev-mtp: fix memory leak in error path, Gerd Hoffmann, 2019/01/08
- [Qemu-devel] [PULL 4/5] hw/usb: Add generic sys-bus EHCI controller, Gerd Hoffmann, 2019/01/08
- Re: [Qemu-devel] [PULL 4/5] hw/usb: Add generic sys-bus EHCI controller,
Hongbo Zhang <=
- [Qemu-devel] [PULL 1/5] hw/usb: fix mistaken de-initialization of CCID state, Gerd Hoffmann, 2019/01/08
- [Qemu-devel] [PULL 2/5] usb: drop unnecessary usb_device_post_load checks, Gerd Hoffmann, 2019/01/08
- [Qemu-devel] [PULL 5/5] usb: move ehci_create_ich9_with_companions to hw/i386, Gerd Hoffmann, 2019/01/08
- Re: [Qemu-devel] [PULL 0/5] Usb 20190108 patches, Peter Maydell, 2019/01/08