qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] arm: allwinner: Wire up USB ports
@ 2020-02-17 20:48 Guenter Roeck
  2020-02-17 20:48 ` [PATCH v3 1/3] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file Guenter Roeck
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Guenter Roeck @ 2020-02-17 20:48 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Beniamino Galvani, qemu-arm, Gerd Hoffmann, Guenter Roeck, qemu-devel

Instantiate EHCI and OHCI controllers on Allwinner A10.

The first patch in the series moves the declaration of EHCISysBusState
from hcd-ohci.c to hcd-ohci.h. This lets us add the structure to
AwA10State. Similar, TYPE_SYSBUS_OHCI is moved to be able to use it
outside its driver.

The second patch introduces the ehci-sysbus property "companion-enable".
This lets us use object_property_set_bool() to enable companion mode.

The third patch instantiates EHCI and OHCI ports for Allwinner-A10
and marks the OHCI ports as companions of the respective EHCI ports.

Tested by attaching various high speed and full speed devices, and by
booting from USB drive.

v3: Rebased to master
v2: Add summary
    Rewrite to instantiate OHCI in companion mode; add patch 2/3
    Merge EHCI and OHCI instantiation into a single patch

----------------------------------------------------------------
Guenter Roeck (3):
      hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file
      hcd-ehci: Introduce "companion-enable" sysbus property
      arm: allwinner: Wire up USB ports

 hw/arm/allwinner-a10.c         | 43 ++++++++++++++++++++++++++++++++++++++++++
 hw/usb/hcd-ehci-sysbus.c       |  2 ++
 hw/usb/hcd-ohci.c              | 15 ---------------
 hw/usb/hcd-ohci.h              | 16 ++++++++++++++++
 include/hw/arm/allwinner-a10.h |  6 ++++++
 5 files changed, 67 insertions(+), 15 deletions(-)


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

* [PATCH v3 1/3] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file
  2020-02-17 20:48 [PATCH v3 0/3] arm: allwinner: Wire up USB ports Guenter Roeck
@ 2020-02-17 20:48 ` Guenter Roeck
  2020-02-17 20:48 ` [PATCH v3 2/3] hcd-ehci: Introduce "companion-enable" sysbus property Guenter Roeck
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2020-02-17 20:48 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Beniamino Galvani, qemu-arm, Gerd Hoffmann, Guenter Roeck, qemu-devel

We need to be able to use OHCISysBusState outside hcd-ohci.c, so move it
to its include file.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v3: Rebased to master
    Added Gerd's Reviewed-by: tag
v2: no changes

 hw/usb/hcd-ohci.c | 15 ---------------
 hw/usb/hcd-ohci.h | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 8a94bd004a..1e6e85e86a 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1870,21 +1870,6 @@ void ohci_sysbus_die(struct OHCIState *ohci)
     ohci_bus_stop(ohci);
 }
 
-#define TYPE_SYSBUS_OHCI "sysbus-ohci"
-#define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_OHCI)
-
-typedef struct {
-    /*< private >*/
-    SysBusDevice parent_obj;
-    /*< public >*/
-
-    OHCIState ohci;
-    char *masterbus;
-    uint32_t num_ports;
-    uint32_t firstport;
-    dma_addr_t dma_offset;
-} OHCISysBusState;
-
 static void ohci_realize_pxa(DeviceState *dev, Error **errp)
 {
     OHCISysBusState *s = SYSBUS_OHCI(dev);
diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h
index 16e3f1e13a..5c8819aedf 100644
--- a/hw/usb/hcd-ohci.h
+++ b/hw/usb/hcd-ohci.h
@@ -22,6 +22,7 @@
 #define HCD_OHCI_H
 
 #include "sysemu/dma.h"
+#include "hw/usb.h"
 
 /* Number of Downstream Ports on the root hub: */
 #define OHCI_MAX_PORTS 15
@@ -90,6 +91,21 @@ typedef struct OHCIState {
     void (*ohci_die)(struct OHCIState *ohci);
 } OHCIState;
 
+#define TYPE_SYSBUS_OHCI "sysbus-ohci"
+#define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_OHCI)
+
+typedef struct {
+    /*< private >*/
+    SysBusDevice parent_obj;
+    /*< public >*/
+
+    OHCIState ohci;
+    char *masterbus;
+    uint32_t num_ports;
+    uint32_t firstport;
+    dma_addr_t dma_offset;
+} OHCISysBusState;
+
 extern const VMStateDescription vmstate_ohci_state;
 
 void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports,
-- 
2.17.1



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

* [PATCH v3 2/3] hcd-ehci: Introduce "companion-enable" sysbus property
  2020-02-17 20:48 [PATCH v3 0/3] arm: allwinner: Wire up USB ports Guenter Roeck
  2020-02-17 20:48 ` [PATCH v3 1/3] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file Guenter Roeck
@ 2020-02-17 20:48 ` Guenter Roeck
  2020-02-17 20:48 ` [PATCH v3 3/3] arm: allwinner: Wire up USB ports Guenter Roeck
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2020-02-17 20:48 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Beniamino Galvani, qemu-arm, Gerd Hoffmann, Guenter Roeck, qemu-devel

We'll use this property in a follow-up patch to insantiate an EHCI
bus with companion support.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v3: Rebased to master
    Added Gerd's Reviewed-by: tag
v2: Added patch

 hw/usb/hcd-ehci-sysbus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
index 8d4738565e..b22fb258be 100644
--- a/hw/usb/hcd-ehci-sysbus.c
+++ b/hw/usb/hcd-ehci-sysbus.c
@@ -33,6 +33,8 @@ static const VMStateDescription vmstate_ehci_sysbus = {
 
 static Property ehci_sysbus_properties[] = {
     DEFINE_PROP_UINT32("maxframes", EHCISysBusState, ehci.maxframes, 128),
+    DEFINE_PROP_BOOL("companion-enable", EHCISysBusState, ehci.companion_enable,
+                     false),
     DEFINE_PROP_END_OF_LIST(),
 };
 
-- 
2.17.1



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

* [PATCH v3 3/3] arm: allwinner: Wire up USB ports
  2020-02-17 20:48 [PATCH v3 0/3] arm: allwinner: Wire up USB ports Guenter Roeck
  2020-02-17 20:48 ` [PATCH v3 1/3] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file Guenter Roeck
  2020-02-17 20:48 ` [PATCH v3 2/3] hcd-ehci: Introduce "companion-enable" sysbus property Guenter Roeck
@ 2020-02-17 20:48 ` Guenter Roeck
  2020-02-18  6:39 ` [PATCH v3 0/3] " Philippe Mathieu-Daudé
  2020-02-20 14:50 ` Peter Maydell
  4 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2020-02-17 20:48 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Beniamino Galvani, qemu-arm, Gerd Hoffmann, Guenter Roeck, qemu-devel

Instantiate EHCI and OHCI controllers on Allwinner A10. OHCI ports are
modeled as companions of the respective EHCI ports.

With this patch applied, USB controllers are discovered and instantiated
when booting the cubieboard machine with a recent Linux kernel.

ehci-platform 1c14000.usb: EHCI Host Controller
ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
ehci-platform 1c14000.usb: irq 26, io mem 0x01c14000
ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
ehci-platform 1c1c000.usb: EHCI Host Controller
ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
ehci-platform 1c1c000.usb: irq 31, io mem 0x01c1c000
ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
ohci-platform 1c14400.usb: Generic Platform OHCI controller
ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
ohci-platform 1c14400.usb: irq 27, io mem 0x01c14400
ohci-platform 1c1c400.usb: Generic Platform OHCI controller
ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4
ohci-platform 1c1c400.usb: irq 32, io mem 0x01c1c400
usb 2-1: new high-speed USB device number 2 using ehci-platform
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi host1: usb-storage 2-1:1.0
usb 3-1: new full-speed USB device number 2 using ohci-platform
input: QEMU QEMU USB Mouse as /devices/platform/soc/1c14400.usb/usb3/3-1/3-1:1.0/0003:0627:0001.0001/input/input0

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v3: Rebased to master
    Added Gerd's Reviewed-by: tag
v2: Instantiate EHCI and OHCI in a single patch
    Use define instead of ARRAY_SIZE to get the number of USB ports
    Instantiate OHCI in companion mode
    Use &error_fatal to handle error conditions

 hw/arm/allwinner-a10.c         | 43 ++++++++++++++++++++++++++++++++++
 include/hw/arm/allwinner-a10.h |  6 +++++
 2 files changed, 49 insertions(+)

diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 1cde165611..2ae9c15311 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -24,11 +24,15 @@
 #include "hw/arm/allwinner-a10.h"
 #include "hw/misc/unimp.h"
 #include "sysemu/sysemu.h"
+#include "hw/boards.h"
+#include "hw/usb/hcd-ohci.h"
 
 #define AW_A10_PIC_REG_BASE     0x01c20400
 #define AW_A10_PIT_REG_BASE     0x01c20c00
 #define AW_A10_UART0_REG_BASE   0x01c28000
 #define AW_A10_EMAC_BASE        0x01c0b000
+#define AW_A10_EHCI_BASE        0x01c14000
+#define AW_A10_OHCI_BASE        0x01c14400
 #define AW_A10_SATA_BASE        0x01c18000
 
 static void aw_a10_init(Object *obj)
@@ -49,6 +53,17 @@ static void aw_a10_init(Object *obj)
 
     sysbus_init_child_obj(obj, "sata", &s->sata, sizeof(s->sata),
                           TYPE_ALLWINNER_AHCI);
+
+    if (machine_usb(current_machine)) {
+        int i;
+
+        for (i = 0; i < AW_A10_NUM_USB; i++) {
+            sysbus_init_child_obj(obj, "ehci[*]", OBJECT(&s->ehci[i]),
+                                  sizeof(s->ehci[i]), TYPE_PLATFORM_EHCI);
+            sysbus_init_child_obj(obj, "ohci[*]", OBJECT(&s->ohci[i]),
+                                  sizeof(s->ohci[i]), TYPE_SYSBUS_OHCI);
+        }
+    }
 }
 
 static void aw_a10_realize(DeviceState *dev, Error **errp)
@@ -121,6 +136,34 @@ static void aw_a10_realize(DeviceState *dev, Error **errp)
     serial_mm_init(get_system_memory(), AW_A10_UART0_REG_BASE, 2,
                    qdev_get_gpio_in(dev, 1),
                    115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
+
+    if (machine_usb(current_machine)) {
+        int i;
+
+        for (i = 0; i < AW_A10_NUM_USB; i++) {
+            char bus[16];
+
+            sprintf(bus, "usb-bus.%d", i);
+
+            object_property_set_bool(OBJECT(&s->ehci[i]), true,
+                                     "companion-enable", &error_fatal);
+            object_property_set_bool(OBJECT(&s->ehci[i]), true, "realized",
+                                     &error_fatal);
+            sysbus_mmio_map(SYS_BUS_DEVICE(&s->ehci[i]), 0,
+                            AW_A10_EHCI_BASE + i * 0x8000);
+            sysbus_connect_irq(SYS_BUS_DEVICE(&s->ehci[i]), 0,
+                               qdev_get_gpio_in(dev, 39 + i));
+
+            object_property_set_str(OBJECT(&s->ohci[i]), bus, "masterbus",
+                                    &error_fatal);
+            object_property_set_bool(OBJECT(&s->ohci[i]), true, "realized",
+                                     &error_fatal);
+            sysbus_mmio_map(SYS_BUS_DEVICE(&s->ohci[i]), 0,
+                            AW_A10_OHCI_BASE + i * 0x8000);
+            sysbus_connect_irq(SYS_BUS_DEVICE(&s->ohci[i]), 0,
+                               qdev_get_gpio_in(dev, 64 + i));
+        }
+    }
 }
 
 static void aw_a10_class_init(ObjectClass *oc, void *data)
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index 40d0b1d9c0..8af724548f 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -8,12 +8,16 @@
 #include "hw/intc/allwinner-a10-pic.h"
 #include "hw/net/allwinner_emac.h"
 #include "hw/ide/ahci.h"
+#include "hw/usb/hcd-ohci.h"
+#include "hw/usb/hcd-ehci.h"
 
 #include "target/arm/cpu.h"
 
 
 #define AW_A10_SDRAM_BASE       0x40000000
 
+#define AW_A10_NUM_USB          2
+
 #define TYPE_AW_A10 "allwinner-a10"
 #define AW_A10(obj) OBJECT_CHECK(AwA10State, (obj), TYPE_AW_A10)
 
@@ -28,6 +32,8 @@ typedef struct AwA10State {
     AwEmacState emac;
     AllwinnerAHCIState sata;
     MemoryRegion sram_a;
+    EHCISysBusState ehci[AW_A10_NUM_USB];
+    OHCISysBusState ohci[AW_A10_NUM_USB];
 } AwA10State;
 
 #endif
-- 
2.17.1



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

* Re: [PATCH v3 0/3] arm: allwinner: Wire up USB ports
  2020-02-17 20:48 [PATCH v3 0/3] arm: allwinner: Wire up USB ports Guenter Roeck
                   ` (2 preceding siblings ...)
  2020-02-17 20:48 ` [PATCH v3 3/3] arm: allwinner: Wire up USB ports Guenter Roeck
@ 2020-02-18  6:39 ` Philippe Mathieu-Daudé
  2020-02-18 22:32   ` Niek Linnenbank
  2020-02-20 14:50 ` Peter Maydell
  4 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-18  6:39 UTC (permalink / raw)
  To: Guenter Roeck, Peter Maydell
  Cc: Beniamino Galvani, Niek Linnenbank, qemu-arm, Gerd Hoffmann, qemu-devel

Cc'ing Niek.

On 2/17/20 9:48 PM, Guenter Roeck wrote:
> Instantiate EHCI and OHCI controllers on Allwinner A10.
> 
> The first patch in the series moves the declaration of EHCISysBusState
> from hcd-ohci.c to hcd-ohci.h. This lets us add the structure to
> AwA10State. Similar, TYPE_SYSBUS_OHCI is moved to be able to use it
> outside its driver.
> 
> The second patch introduces the ehci-sysbus property "companion-enable".
> This lets us use object_property_set_bool() to enable companion mode.
> 
> The third patch instantiates EHCI and OHCI ports for Allwinner-A10
> and marks the OHCI ports as companions of the respective EHCI ports.
> 
> Tested by attaching various high speed and full speed devices, and by
> booting from USB drive.
> 
> v3: Rebased to master
> v2: Add summary
>      Rewrite to instantiate OHCI in companion mode; add patch 2/3
>      Merge EHCI and OHCI instantiation into a single patch
> 
> ----------------------------------------------------------------
> Guenter Roeck (3):
>        hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file
>        hcd-ehci: Introduce "companion-enable" sysbus property
>        arm: allwinner: Wire up USB ports
> 
>   hw/arm/allwinner-a10.c         | 43 ++++++++++++++++++++++++++++++++++++++++++
>   hw/usb/hcd-ehci-sysbus.c       |  2 ++
>   hw/usb/hcd-ohci.c              | 15 ---------------
>   hw/usb/hcd-ohci.h              | 16 ++++++++++++++++
>   include/hw/arm/allwinner-a10.h |  6 ++++++
>   5 files changed, 67 insertions(+), 15 deletions(-)
> 



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

* Re: [PATCH v3 0/3] arm: allwinner: Wire up USB ports
  2020-02-18  6:39 ` [PATCH v3 0/3] " Philippe Mathieu-Daudé
@ 2020-02-18 22:32   ` Niek Linnenbank
  0 siblings, 0 replies; 7+ messages in thread
From: Niek Linnenbank @ 2020-02-18 22:32 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Developers, Beniamino Galvani, qemu-arm,
	Gerd Hoffmann, Guenter Roeck

[-- Attachment #1: Type: text/plain, Size: 4134 bytes --]

Hi Guenter, Philippe,

On Tue, Feb 18, 2020 at 7:39 AM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> Cc'ing Niek.
>
> On 2/17/20 9:48 PM, Guenter Roeck wrote:
> > Instantiate EHCI and OHCI controllers on Allwinner A10.
> >
> > The first patch in the series moves the declaration of EHCISysBusState
> > from hcd-ohci.c to hcd-ohci.h. This lets us add the structure to
> > AwA10State. Similar, TYPE_SYSBUS_OHCI is moved to be able to use it
> > outside its driver.
> >
> > The second patch introduces the ehci-sysbus property "companion-enable".
> > This lets us use object_property_set_bool() to enable companion mode.
> >
> > The third patch instantiates EHCI and OHCI ports for Allwinner-A10
> > and marks the OHCI ports as companions of the respective EHCI ports.
> >
> > Tested by attaching various high speed and full speed devices, and by
> > booting from USB drive.
> >
> > v3: Rebased to master
> > v2: Add summary
> >      Rewrite to instantiate OHCI in companion mode; add patch 2/3
> >      Merge EHCI and OHCI instantiation into a single patch
> >
> > ----------------------------------------------------------------
> > Guenter Roeck (3):
> >        hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to
> include file
> >        hcd-ehci: Introduce "companion-enable" sysbus property
> >        arm: allwinner: Wire up USB ports
> >
> >   hw/arm/allwinner-a10.c         | 43
> ++++++++++++++++++++++++++++++++++++++++++
> >   hw/usb/hcd-ehci-sysbus.c       |  2 ++
> >   hw/usb/hcd-ohci.c              | 15 ---------------
> >   hw/usb/hcd-ohci.h              | 16 ++++++++++++++++
> >   include/hw/arm/allwinner-a10.h |  6 ++++++
> >   5 files changed, 67 insertions(+), 15 deletions(-)
> >
>
>
Thanks for contributing this! I was able to test & verify it on my local
machine using latest Qemu master and linux 5.5.0.
I just had to add the -usb flag to the Qemu command and re-compile linux
with CONFIG_USB_STORAGE.

Output with buildroot on a USB mass storage disk as rootfs:

++ ./arm-softmmu/qemu-system-arm -M cubieboard -kernel
$HOME/cubie/linux.git/arch/arm/boot/zImage -nographic -append
'console=ttyS0,115200 earlyprintk debug rootwait root=/dev/sda ro
init=/sbin/init' -dtb
$HOME/cubie/linux.git/arch/arm/boot/dts/sun4i-a10-cubieboard.dtb -m 512 -s
-usb -drive
if=none,id=stick,file=$HOME/cubie/buildroot-2019.11/output/images/rootfs.ext2
-device usb-storage,bus=usb-bus.1,drive=stick -nic user
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.5.0-rc3 (me@host) (gcc version 7.4.0
(Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #6 SMP Tue Feb 18 23:21:36 CET 2020
[    0.000000] CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7),
cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing
instruction cache
[    0.000000] OF: fdt: Machine model: Cubietech Cubieboard
[    0.000000] Memory policy: Data cache writeback
...
[    4.559154] random: fast init done
[    5.481107] scsi 1:0:0:0: Direct-Access     QEMU     QEMU HARDDISK
 2.5+ PQ: 0 ANSI: 5
[    5.493282] sd 1:0:0:0: Power-on or device reset occurred
[    5.513539] sd 1:0:0:0: [sda] 122880 512-byte logical blocks: (62.9
MB/60.0 MiB)
[    5.521970] sd 1:0:0:0: [sda] Write Protect is off
[    5.522683] sd 1:0:0:0: [sda] Mode Sense: 63 00 00 08
[    5.524552] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[    5.613064] sd 1:0:0:0: [sda] Attached SCSI disk
[    5.681764] EXT4-fs (sda): INFO: recovery required on readonly filesystem
[    5.682530] EXT4-fs (sda): write access will be enabled during recovery
...
[    6.129348] EXT4-fs (sda): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: [    7.205617] random: dd: uninitialized urandom read
(512 bytes read)
OK
Starting network: OK

Welcome to Cubieboard2!
Cubieboard2 login:


Thanks!

Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>

Regards,
Niek


-- 
Niek Linnenbank

[-- Attachment #2: Type: text/html, Size: 5291 bytes --]

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

* Re: [PATCH v3 0/3] arm: allwinner: Wire up USB ports
  2020-02-17 20:48 [PATCH v3 0/3] arm: allwinner: Wire up USB ports Guenter Roeck
                   ` (3 preceding siblings ...)
  2020-02-18  6:39 ` [PATCH v3 0/3] " Philippe Mathieu-Daudé
@ 2020-02-20 14:50 ` Peter Maydell
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2020-02-20 14:50 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Beniamino Galvani, qemu-arm, Gerd Hoffmann, QEMU Developers

On Mon, 17 Feb 2020 at 20:48, Guenter Roeck <linux@roeck-us.net> wrote:
>
> Instantiate EHCI and OHCI controllers on Allwinner A10.
>
> The first patch in the series moves the declaration of EHCISysBusState
> from hcd-ohci.c to hcd-ohci.h. This lets us add the structure to
> AwA10State. Similar, TYPE_SYSBUS_OHCI is moved to be able to use it
> outside its driver.
>
> The second patch introduces the ehci-sysbus property "companion-enable".
> This lets us use object_property_set_bool() to enable companion mode.
>
> The third patch instantiates EHCI and OHCI ports for Allwinner-A10
> and marks the OHCI ports as companions of the respective EHCI ports.
>
> Tested by attaching various high speed and full speed devices, and by
> booting from USB drive.
>
> v3: Rebased to master
> v2: Add summary
>     Rewrite to instantiate OHCI in companion mode; add patch 2/3
>     Merge EHCI and OHCI instantiation into a single patch
>



Applied to target-arm.next, thanks.

-- PMM


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

end of thread, other threads:[~2020-02-20 14:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 20:48 [PATCH v3 0/3] arm: allwinner: Wire up USB ports Guenter Roeck
2020-02-17 20:48 ` [PATCH v3 1/3] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file Guenter Roeck
2020-02-17 20:48 ` [PATCH v3 2/3] hcd-ehci: Introduce "companion-enable" sysbus property Guenter Roeck
2020-02-17 20:48 ` [PATCH v3 3/3] arm: allwinner: Wire up USB ports Guenter Roeck
2020-02-18  6:39 ` [PATCH v3 0/3] " Philippe Mathieu-Daudé
2020-02-18 22:32   ` Niek Linnenbank
2020-02-20 14:50 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).