From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0W9-0004xi-FV for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:44:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur0W7-0000IS-6h for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:44:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur0W6-0000Ht-TR for qemu-devel@nongnu.org; Mon, 24 Jun 2013 02:44:47 -0400 From: Gerd Hoffmann Date: Mon, 24 Jun 2013 08:44:37 +0200 Message-Id: <1372056283-4845-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1372056283-4845-1-git-send-email-kraxel@redhat.com> References: <1372056283-4845-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 3/9] usb/hcd-ehci: Add Tegra2 SysBus EHCI device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Vincent Palatin , Gerd Hoffmann From: Andreas F=C3=A4rber This prepares an EHCI device for the Nvidia Tegra2 SoC family. Values based on patch by Vincent Palatin and verified against TRM v01p. Cc: Vincent Palatin Signed-off-by: Andreas F=C3=A4rber Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci-sysbus.c | 15 +++++++++++++++ hw/usb/hcd-ehci.h | 1 + 2 files changed, 16 insertions(+) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index e450137..68667b5 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -104,11 +104,26 @@ static const TypeInfo ehci_exynos4210_type_info =3D= { .class_init =3D ehci_exynos4210_class_init, }; =20 +static void ehci_tegra2_class_init(ObjectClass *oc, void *data) +{ + SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); + + sec->capsbase =3D 0x100; + sec->opregbase =3D 0x140; +} + +static const TypeInfo ehci_tegra2_type_info =3D { + .name =3D TYPE_TEGRA2_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_tegra2_class_init, +}; + static void ehci_sysbus_register_types(void) { type_register_static(&ehci_type_info); type_register_static(&ehci_xlnx_type_info); type_register_static(&ehci_exynos4210_type_info); + type_register_static(&ehci_tegra2_type_info); } =20 type_init(ehci_sysbus_register_types) diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 7a93957..2c03e8f 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -339,6 +339,7 @@ typedef struct EHCIPCIState { =20 #define TYPE_SYS_BUS_EHCI "sysbus-ehci-usb" #define TYPE_EXYNOS4210_EHCI "exynos4210-ehci-usb" +#define TYPE_TEGRA2_EHCI "tegra2-ehci-usb" =20 #define SYS_BUS_EHCI(obj) \ OBJECT_CHECK(EHCISysBusState, (obj), TYPE_SYS_BUS_EHCI) --=20 1.7.9.7