[1/3] arm: allwinner: Enable USB OHCI
diff mbox series

Message ID 20181029223207.31878-2-philmd@redhat.com
State New
Headers show
Series
  • hw/arm: Enable USB OHCI/EHCI on Allwinner A10
Related show

Commit Message

Philippe Mathieu-Daudé Oct. 29, 2018, 10:32 p.m. UTC
From: Guenter Roeck <linux@roeck-us.net>

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[PMD: Intented tabs -> space]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/allwinner-a10.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 9fe875cdb5..0a8ac929f5 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -22,6 +22,8 @@ 
 #include "hw/sysbus.h"
 #include "hw/devices.h"
 #include "hw/arm/allwinner-a10.h"
+#include "hw/boards.h"
+#include "hw/usb/hcd-ehci.h"
 
 static void aw_a10_init(Object *obj)
 {
@@ -110,6 +112,11 @@  static void aw_a10_realize(DeviceState *dev, Error **errp)
     /* FIXME use a qdev chardev prop instead of serial_hd() */
     serial_mm_init(get_system_memory(), AW_A10_UART0_REG_BASE, 2, s->irq[1],
                    115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
+
+    if (machine_usb(current_machine)) {
+        sysbus_create_simple("sysbus-ohci", 0x01c14400, s->irq[64]);
+        sysbus_create_simple("sysbus-ohci", 0x01c1c400, s->irq[65]);
+    }
 }
 
 static void aw_a10_class_init(ObjectClass *oc, void *data)