qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/usb/hcd-dwc2: Simplified I/O memory regions


From: Paul Zimmerman
Subject: Re: [PATCH] hw/usb/hcd-dwc2: Simplified I/O memory regions
Date: Tue, 21 Apr 2020 12:13:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

On 4/21/20 12:13 AM, Philippe Mathieu-Daudé wrote:
Use 1 container holding 2 regions:
- I/O registers
- FIFOs

Remove all the static base addresses.

Name address space.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
Sometime a patch is cleaner/quicker than explanations.
Suggestion to be squashed on patch:
'dwc-hsotg (dwc2) USB host controller emulation'

Further simplificatio would be to move some exploded read/write
functions directly into dwc2_hsotg_read/write.

Based-on: <address@hidden>
---
  hw/usb/hcd-dwc2.h |  17 +----
  hw/usb/hcd-dwc2.c | 181 ++++++++++++++++++++++------------------------
  2 files changed, 88 insertions(+), 110 deletions(-)

<snip>

Ooh, yes, that looks much cleaner and simpler, thanks! I will test this
and fold it into the next version of the patch.

  static Property dwc2_usb_properties[] = {
      DEFINE_PROP_UINT32("usb_version", DWC2State, usb_version, 2),
+    /* FIXME isn't 'usb_version=2' const? */

This allows to switch between full-speed and high-speed at boot time,
which I've found very useful for testing purposes.

+    DEFINE_PROP_END_OF_LIST()
  };
static void dwc2_class_init(ObjectClass *klass, void *data)

Thanks,
Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]