From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkaRR-0007G2-3J for qemu-devel@nongnu.org; Thu, 06 Jun 2013 09:41:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkaRP-0004Ob-TP for qemu-devel@nongnu.org; Thu, 06 Jun 2013 09:41:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35473 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkaRP-0004O4-No for qemu-devel@nongnu.org; Thu, 06 Jun 2013 09:41:23 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 6 Jun 2013 15:41:11 +0200 Message-Id: <1370526073-18136-4-git-send-email-afaerber@suse.de> In-Reply-To: <1370526073-18136-1-git-send-email-afaerber@suse.de> References: <1370526073-18136-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 3/5] 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 , kraxel@redhat.com 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 --- 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 92594a2..5806b0a 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 d0e847d..951b117 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.8.1.4