From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web08.55.1615571054030271282 for ; Fri, 12 Mar 2021 09:44:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WxFVQb2r; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 61A0164F0D for ; Fri, 12 Mar 2021 17:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615571050; bh=2c6PpymR58lOwHAIYxjonXf8K4ZrtxNO14/79ErMSY0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WxFVQb2r6+AFkBVcxshyOMZSR5OVXezolzl3QpkyIuDy4oSoG6EzyvDmJfJ0BfVJ3 v/T3ma8wlWaq6wfEN49GErbxBp3xxRwWPLpYnyJOw2Q3rBZVckKaAM8hx80Jje4j1p ugUhUrsTnX9afcOq3laNcbIQt5mdLdJlvvSzXV+KWQfvucAYn5G0ZrnhfWAC8oNK0W 5CvMdQE839UoVpb6GL6Bp2ftfg6KtEniPBL1UjgJjMD/8KiTeZlBu3lxcAM6qiGGej xNUUesGssgiaOsqn960GrlFvibw5nSuh/WrZP08lQR0XcWAUfgmTcOVadUb8IQ7+Rq tcO/+6aLMzCxg== Received: by mail-oo1-f53.google.com with SMTP id c12-20020a4ae24c0000b02901bad05f40e4so1734018oot.4 for ; Fri, 12 Mar 2021 09:44:10 -0800 (PST) X-Gm-Message-State: AOAM53276xBiM+XcbZQMsuxEQzmq301M1ju2JxnA6zyb043FbxT1/9Gx u607TnzJJ+KcbweBxN7D2Yfklof3E7DahT3T8V4= X-Google-Smtp-Source: ABdhPJwgGAuStvFm/z1aSN9ql2diL7l77KCpoqSx3+qYNw4uKO9m5L1cgirX3cZaj5/7rcYmQow9O08Rnrw+9ky4SMA= X-Received: by 2002:a4a:395d:: with SMTP id x29mr1861035oog.41.1615571049671; Fri, 12 Mar 2021 09:44:09 -0800 (PST) MIME-Version: 1.0 References: <7669a539-91a0-7b48-a6b7-897dbfeda3ae@measite.de> In-Reply-To: From: "Ard Biesheuvel" Date: Fri, 12 Mar 2021 18:43:58 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix dwc2 reset on raspberry pi boards To: =?UTF-8?Q?Ren=C3=A9_Treffer?= Cc: devel@edk2.groups.io, Pete Batard , Leif Lindholm , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 12 Mar 2021 at 18:42, Ren=C3=A9 Treffer wrote: > > 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=C3=A9 Treffer Pushed as abf4c54b2192..2620e05c6fad Thanks all > --- > 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 =3D gBS->InstallMultipleProtocolInterfaces ( > -- > 2.27.0