All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-arm] [PATCH 1/2] usb/ehci: Add SysBus EHCI device for Allwinner SoCs
@ 2017-01-29  1:00 Icenowy Zheng
  2017-01-29  1:00 ` [Qemu-arm] [PATCH 2/2] arm: allwinner-a10: Add OHCI/EHCI Icenowy Zheng
  2017-01-30  8:19 ` [Qemu-arm] [PATCH 1/2] usb/ehci: Add SysBus EHCI device for Allwinner SoCs Gerd Hoffmann
  0 siblings, 2 replies; 5+ messages in thread
From: Icenowy Zheng @ 2017-01-29  1:00 UTC (permalink / raw)
  To: Beniamino Galvani, Peter Maydell, Gerd Hoffmann; +Cc: qemu-arm, Icenowy Zheng

It uses a register map like the one in Exynos SoCs.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 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 6c20604d07..d99bb4abe7 100644
--- a/hw/usb/hcd-ehci-sysbus.c
+++ b/hw/usb/hcd-ehci-sysbus.c
@@ -218,6 +218,22 @@ static const TypeInfo ehci_fusbh200_type_info = {
     .class_init    = fusbh200_ehci_class_init,
 };
 
+static void ehci_allwinner_class_init(ObjectClass *oc, void *data)
+{
+    SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc);
+    DeviceClass *dc = DEVICE_CLASS(oc);
+
+    sec->capsbase = 0x0;
+    sec->opregbase = 0x10;
+    set_bit(DEVICE_CATEGORY_USB, dc->categories);
+}
+
+static const TypeInfo ehci_allwinner_type_info = {
+    .name          = TYPE_ALLWINNER_EHCI,
+    .parent        = TYPE_SYS_BUS_EHCI,
+    .class_init    = ehci_allwinner_class_init,
+};
+
 static void ehci_sysbus_register_types(void)
 {
     type_register_static(&ehci_type_info);
@@ -225,6 +241,7 @@ static void ehci_sysbus_register_types(void)
     type_register_static(&ehci_exynos4210_type_info);
     type_register_static(&ehci_tegra2_type_info);
     type_register_static(&ehci_fusbh200_type_info);
+    type_register_static(&ehci_allwinner_type_info);
 }
 
 type_init(ehci_sysbus_register_types)
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
index 3fd7038658..89f3c7d922 100644
--- a/hw/usb/hcd-ehci.h
+++ b/hw/usb/hcd-ehci.h
@@ -343,6 +343,7 @@ typedef struct EHCIPCIState {
 #define TYPE_EXYNOS4210_EHCI "exynos4210-ehci-usb"
 #define TYPE_TEGRA2_EHCI "tegra2-ehci-usb"
 #define TYPE_FUSBH200_EHCI "fusbh200-ehci-usb"
+#define TYPE_ALLWINNER_EHCI "allwinner-ehci-usb"
 
 #define SYS_BUS_EHCI(obj) \
     OBJECT_CHECK(EHCISysBusState, (obj), TYPE_SYS_BUS_EHCI)
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* Re: [Qemu-arm] [PATCH 1/2] usb/ehci: Add SysBus EHCI device for Allwinner SoCs
@ 2017-01-30 13:59 Icenowy Zheng
  2017-02-07  7:42 ` Gerd Hoffmann
  0 siblings, 1 reply; 5+ messages in thread
From: Icenowy Zheng @ 2017-01-30 13:59 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Beniamino Galvani, Peter Maydell, qemu-arm


2017年1月30日 16:19于 Gerd Hoffmann <kraxel@redhat.com>写道:
>
> On So, 2017-01-29 at 09:00 +0800, Icenowy Zheng wrote: 
> > It uses a register map like the one in Exynos SoCs. 
> > 
> > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> 
>
> I guess this goes through the arm queue? 

I don't know about the QEMU development process, sorry.

>
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> 
>
> cheers, 
>   Gerd 
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-07  7:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-29  1:00 [Qemu-arm] [PATCH 1/2] usb/ehci: Add SysBus EHCI device for Allwinner SoCs Icenowy Zheng
2017-01-29  1:00 ` [Qemu-arm] [PATCH 2/2] arm: allwinner-a10: Add OHCI/EHCI Icenowy Zheng
2017-01-30  8:19 ` [Qemu-arm] [PATCH 1/2] usb/ehci: Add SysBus EHCI device for Allwinner SoCs Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2017-01-30 13:59 Icenowy Zheng
2017-02-07  7:42 ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.