From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mx.groups.io with SMTP id smtpd.web10.16.1615570931957268201 for ; Fri, 12 Mar 2021 09:42:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@measite-de.20150623.gappssmtp.com header.s=20150623 header.b=B6YNYL78; spf=none, err=permanent DNS error (domain: measite.de, ip: 209.85.208.46, mailfrom: treffer@measite.de) Received: by mail-ed1-f46.google.com with SMTP id z1so9126220edb.8 for ; Fri, 12 Mar 2021 09:42:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=measite-de.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=/H4WrPpf5MqKTveuv30M3PzVQqqX0vUKVpbymczjvpY=; b=B6YNYL78WmA4pXEGs0Xj7JCgo6NktS0mL+gYjU39C8fhtc6GdEHZGt0ELZAKuIgWTK 1P/yTjDrpxQaXVHMAwpcXceQEZpSH1yBqMf+PpD2zUOWYAIGJ3XwOoum2EjZA6z3l58V 3DldQzn1U9dFGaw4+uFlvdJR+2AAnuaihfVsnYlGl9/vyTVkNHuzGZQAW6+Lb7OYtVOf f2lYI+R017igFvfflxNaYOaj0MaK9bu6RY3bSl9UsXzdYylgILB4ehddV4fZiVcBHuBW GNlezTNVyB7aJ2rJjkCpQnYwDesHjPfaQDHJqxWXwduZ77TjEx22/fbBWcq3LI7LpzDS 8gnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/H4WrPpf5MqKTveuv30M3PzVQqqX0vUKVpbymczjvpY=; b=UyA3ZPGZOvwPlVAyloxWo/OzX6mvOgNFzlXGMMvy4+8zWk8hdkebVmCKRUjYWPgq8k qJQfb43w1HdYwK/osH8JjeM+/LnbBkEjOkJ2J/Fau0vDe+VsPUYR/SvMF71qmQ+uEM/E Q4ALvu/z3mGtCGFudMlgTKE/nFWeSbPe9OXC/1v5oYsgC/Flv9GGFaN3955N5FkD034s Ce2ixzZVm3xM9Q7pWO8zZ1z0J36cFmHZNa1p249Y7d4j37M0Bjcjgpa+tSMA0OYCNUQu 2Su+NuZbOmwkJN6d+MJnzp1trs089AdW9tATwhhi7xpyKneLsB14FLi5VTJQQ8Efa+se Xz0g== X-Gm-Message-State: AOAM531Zi3ym3pxGFNuy0Os5vaaJqsm5gcYBcw+HITKp+AkC924oOgDf ICvyTHSOfNejy6Md1K7qzvpBsA== X-Google-Smtp-Source: ABdhPJx4OHqWbROhYVt0VEvgGiopXkPNNtkQyajObi2L8gHMVpysHfuqKKoeR7Hmk4Cqlwokqocjpg== X-Received: by 2002:a05:6402:b70:: with SMTP id cb16mr15585314edb.11.1615570930579; Fri, 12 Mar 2021 09:42:10 -0800 (PST) Return-Path: Received: from [192.168.2.198] (p54ac52d9.dip0.t-ipconnect.de. [84.172.82.217]) by smtp.gmail.com with ESMTPSA id n25sm3180227edq.55.2021.03.12.09.42.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Mar 2021 09:42:09 -0800 (PST) Subject: [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix dwc2 reset on raspberry pi boards To: devel@edk2.groups.io Cc: Pete Batard , Leif Lindholm , Ard Biesheuvel , Ard Biesheuvel References: <7669a539-91a0-7b48-a6b7-897dbfeda3ae@measite.de> From: =?UTF-8?Q?Ren=c3=a9_Treffer?= Message-ID: Date: Fri, 12 Mar 2021 18:42:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US DwHcReset expects attributes as the second argument. A reset is performed if the passed attribute is valued. 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. Reviewed-by: Samer El-Haj-Mahmoud Signed-off-by: René Treffer ---  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