From nobody Thu Nov 6 12:13:08 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540852545709742.6159265488544; Mon, 29 Oct 2018 15:35:45 -0700 (PDT) Received: from localhost ([::1]:49364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHG8I-0001QL-Dr for importer@patchew.org; Mon, 29 Oct 2018 18:35:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHG6X-0000SH-3X for qemu-devel@nongnu.org; Mon, 29 Oct 2018 18:33:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHG6W-0006mN-0G for qemu-devel@nongnu.org; Mon, 29 Oct 2018 18:33:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHG6R-0006hn-9P; Mon, 29 Oct 2018 18:33:43 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 242384E91F; Mon, 29 Oct 2018 22:33:35 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-38.brq.redhat.com [10.40.204.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 194FF19489; Mon, 29 Oct 2018 22:33:22 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , Icenowy Zheng , Guenter Roeck , Gerd Hoffmann Date: Mon, 29 Oct 2018 23:32:06 +0100 Message-Id: <20181029223207.31878-3-philmd@redhat.com> In-Reply-To: <20181029223207.31878-1-philmd@redhat.com> References: <20181029223207.31878-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 29 Oct 2018 22:33:35 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/3] usb: ehci: Add support for Allwinner A10 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Gerd Hoffmann --- Gerd: You already review this code here: https://lists.gnu.org/archive/html/qemu-arm/2017-01/msg00345.html Can we use your R-b again? hw/usb/hcd-ehci-sysbus.c | 17 +++++++++++++++++ hw/usb/hcd-ehci.h | 1 + 2 files changed, 18 insertions(+) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 3b83beb140..87fac9de01 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -110,6 +110,22 @@ static const TypeInfo ehci_xlnx_type_info =3D { .class_init =3D ehci_xlnx_class_init, }; =20 +static void ehci_aw_a10_class_init(ObjectClass *oc, void *data) +{ + SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); + DeviceClass *dc =3D DEVICE_CLASS(oc); + + sec->capsbase =3D 0x0; + sec->opregbase =3D 0x10; + set_bit(DEVICE_CATEGORY_USB, dc->categories); +} + +static const TypeInfo ehci_aw_a10_type_info =3D { + .name =3D TYPE_AW_A10_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_aw_a10_class_init, +}; + static void ehci_exynos4210_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); @@ -246,6 +262,7 @@ static void ehci_sysbus_register_types(void) { type_register_static(&ehci_type_info); type_register_static(&ehci_xlnx_type_info); + type_register_static(&ehci_aw_a10_type_info); type_register_static(&ehci_exynos4210_type_info); type_register_static(&ehci_tegra2_type_info); type_register_static(&ehci_ppc4xx_type_info); diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 0bc364b286..8d78864a82 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -342,6 +342,7 @@ typedef struct EHCIPCIState { =20 =20 #define TYPE_SYS_BUS_EHCI "sysbus-ehci-usb" +#define TYPE_AW_A10_EHCI "aw-a10-ehci-usb" #define TYPE_EXYNOS4210_EHCI "exynos4210-ehci-usb" #define TYPE_TEGRA2_EHCI "tegra2-ehci-usb" #define TYPE_PPC4xx_EHCI "ppc4xx-ehci-usb" --=20 2.17.2