public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix dwc2 reset on raspberry pi boards
@ 2021-03-11 12:40 treffer+groups.io
  2021-03-11 21:50 ` [edk2-devel] " Samer El-Haj-Mahmoud
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: treffer+groups.io @ 2021-03-11 12:40 UTC (permalink / raw)
  To: devel; +Cc: Pete Batard, Leif Lindholm, Ard Biesheuvel

DwHcReset expects attributes as the second argument. A reset is
performed if the passed attribute is valid. However 0 is not a valid
attribute and will thus never cause a controller reset.

Passing EFI_USB_HC_RESET_HOST_CONTROLLER will reset the dwc2 controller
as expected.

This enables the USB 2.0 port of the raspberry compute module 4.
---
 Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
index bada13a6cd..bb228e62d9 100644
--- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
+++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
@@ -140,7 +140,7 @@ DriverStart (
    * UsbBusDxe as of b4e96b82b4e2e47e95014b51787ba5b43abac784 expects
    * the HCD to do this. There is no agent invoking DwHcReset anymore.
    */
-  DwHcReset (&DwHc->DwUsbOtgHc, 0);
+  DwHcReset (&DwHc->DwUsbOtgHc, EFI_USB_HC_RESET_HOST_CONTROLLER);
   DwHcSetState (&DwHc->DwUsbOtgHc, EfiUsbHcStateOperational);
 
   Status = gBS->InstallMultipleProtocolInterfaces (
-- 
2.27.0


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

end of thread, other threads:[~2021-03-12 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11 12:40 [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix dwc2 reset on raspberry pi boards treffer+groups.io
2021-03-11 21:50 ` [edk2-devel] " Samer El-Haj-Mahmoud
     [not found] ` <166B6833F171D19D.3362@groups.io>
2021-03-12 15:17   ` Samer El-Haj-Mahmoud
2021-03-12 16:00 ` Ard Biesheuvel
2021-03-12 17:42   ` René Treffer
2021-03-12 17:43     ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox