qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	Bernhard Beschow <shentey@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 2/2] hw/usb/hcd-dwc3: Set erstba-hi-lo property
Date: Sat,  5 Apr 2025 07:00:02 -0700	[thread overview]
Message-ID: <20250405140002.3537411-3-linux@roeck-us.net> (raw)
In-Reply-To: <20250405140002.3537411-1-linux@roeck-us.net>

The dwc3 hardware requires the ERSTBA address to be written in
high-low order.

From information found in the Linux kernel:

[Synopsys]- The host controller was design to support ERST setting
during the RUN state. But since there is a limitation in controller
in supporting separate ERSTBA_HI and ERSTBA_LO programming,
It is supported when the ERSTBA is programmed in 64bit,
or in 32 bit mode ERSTBA_HI before ERSTBA_LO

[Synopsys]- The internal initialization of event ring fetches
the "Event Ring Segment Table Entry" based on the indication of
ERSTBA_LO written.

Inform the XHCI core to expect ERSTBA to be written in high-low order.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 hw/usb/hcd-dwc3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/usb/hcd-dwc3.c b/hw/usb/hcd-dwc3.c
index 0bceee2712..6783d55526 100644
--- a/hw/usb/hcd-dwc3.c
+++ b/hw/usb/hcd-dwc3.c
@@ -603,6 +603,7 @@ static void usb_dwc3_realize(DeviceState *dev, Error **errp)
     SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
     Error *err = NULL;
 
+    qdev_prop_set_bit(DEVICE(&s->sysbus_xhci), "erstba-hi-lo", true);
     sysbus_realize(SYS_BUS_DEVICE(&s->sysbus_xhci), &err);
     if (err) {
         error_propagate(errp, err);
-- 
2.45.2



  parent reply	other threads:[~2025-04-05 14:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-05 14:00 [PATCH 0/2] Add property to support writing ERSTBA in high-low order Guenter Roeck
2025-04-05 14:00 ` [PATCH 1/2] hw: usb: xhci: " Guenter Roeck
2025-04-11  7:40   ` Nicholas Piggin
2025-04-12 22:46     ` Guenter Roeck
2025-04-13 16:03     ` Guenter Roeck
2025-07-16 19:59       ` Bernhard Beschow
2025-07-16 20:07         ` Guenter Roeck
2025-07-17 10:33           ` Bernhard Beschow
2025-04-05 14:00 ` Guenter Roeck [this message]
2025-04-11  7:42   ` [PATCH 2/2] hw/usb/hcd-dwc3: Set erstba-hi-lo property Nicholas Piggin
2025-04-05 14:25 ` [PATCH 0/2] Add property to support writing ERSTBA in high-low order Philippe Mathieu-Daudé
2025-04-05 16:25   ` Guenter Roeck
2025-04-05 17:26   ` Guenter Roeck
2025-04-05 19:28     ` Bernhard Beschow
2025-04-05 20:39       ` Guenter Roeck
2025-04-06  1:31       ` Guenter Roeck
2025-04-06 11:03         ` Bernhard Beschow
2025-04-06 15:30           ` Guenter Roeck
2025-04-06 18:08             ` Bernhard Beschow
2025-04-08 16:09               ` Guenter Roeck
2025-04-08 19:57                 ` Bernhard Beschow
2025-04-08 20:31                   ` Guenter Roeck
2025-04-08 21:56                     ` Bernhard Beschow
2025-04-11  3:53                       ` Guenter Roeck
2025-04-11  5:50                         ` Bernhard Beschow
2025-04-08 20:56                   ` Guenter Roeck
2025-04-08 19:47 ` Bernhard Beschow
2025-04-11  5:52 ` Bernhard Beschow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250405140002.3537411-3-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shentey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).