public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Adrien Thierry" <athierry@redhat.com>
To: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Jeremy Linton <jeremy.linton@arm.com>,
	devel@edk2.groups.io
Cc: Adrien Thierry <athierry@redhat.com>
Subject: [edk2-platforms PATCH 2/2] Platform/RaspberryPi: delete usb node instead of pci in SyncPcie()
Date: Thu, 29 Sep 2022 15:53:35 -0400	[thread overview]
Message-ID: <20220929195335.61495-3-athierry@redhat.com> (raw)
In-Reply-To: <20220929195335.61495-1-athierry@redhat.com>

In SyncPcie(), the pci node is removed from the device tree to make sure
the XHCI controller is not reset by Linux in DT mode. However, we should
only remove the usb child node and not the whole pci node. Removing the
whole pci node prevents Linux to bypass XHCI handoff for the Raspberry
Pi 4 [1]. Moreover, removing the usb node seems to have been the
original intent according to the error messages shown if the node is not
detected.

[1] https://elixir.bootlin.com/linux/latest/source/drivers/usb/host/pci-quirks.c#L1258

Fixes: efff29cdcdb7 ("Platform/RaspberryPi: Always use non translating DMA in DT mode")
Signed-off-by: Adrien Thierry <athierry@redhat.com>
---
 Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index 55c9d185fc..26334e50b8 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -388,7 +388,7 @@ SyncPcie (
    * triggering the mailbox by removing the node.
    */
 
-  Node = fdt_path_offset (mFdtImage, "/scb/pcie@7d500000/pci@0,0");
+  Node = fdt_path_offset (mFdtImage, "/scb/pcie@7d500000/pci@0,0/usb@0,0");
   if (Node < 0) {
     // This can happen on CM4/etc which doesn't have an onboard XHCI
     DEBUG ((DEBUG_INFO, "%a: failed to locate /scb/pcie@7d500000/pci@0/usb@0\n", __FUNCTION__));
-- 
2.37.3


  parent reply	other threads:[~2022-09-29 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 19:53 [edk2-platforms PATCH 0/2] Platform/RaspberryPi: SyncPcie() fixes Adrien Thierry
2022-09-29 19:53 ` [edk2-platforms PATCH 1/2] Platform/RaspberryPi: fix pci DT node address in SyncPcie() Adrien Thierry
2022-09-29 19:53 ` Adrien Thierry [this message]
2022-09-30 14:45 ` [edk2-platforms PATCH 0/2] Platform/RaspberryPi: SyncPcie() fixes Jeremy Linton
2022-09-30 18:47   ` Adrien Thierry
2022-10-03 20:12     ` Jeremy Linton
2022-10-04 16:58       ` Adrien Thierry

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-list 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=20220929195335.61495-3-athierry@redhat.com \
    --to=devel@edk2.groups.io \
    /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