From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mx.groups.io with SMTP id smtpd.web10.5428.1615466416117007358 for ; Thu, 11 Mar 2021 04:40:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@measite-de.20150623.gappssmtp.com header.s=20150623 header.b=fFjg3X2Q; spf=none, err=permanent DNS error (domain: measite.de, ip: 209.85.218.41, mailfrom: treffer+groups.io@measite.de) Received: by mail-ej1-f41.google.com with SMTP id mm21so45843168ejb.12 for ; Thu, 11 Mar 2021 04:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=measite-de.20150623.gappssmtp.com; s=20150623; h=to:from:subject:cc:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=vnXc4Yb/pHWEJbtYhNgr22snq77imLXAT0wx5jnwjo4=; b=fFjg3X2QaA491uZOLI0H2gcYDH+O67oYRcmDofiarpFgN0QB7DNE1xLATkZ/Wml4VS m/zDlTwkyYxcV/TSM6/8/z7PqR7EVjlTLcbn1oLCSxLbq6ppv6bF17Mg65H2/zlXpYhA LK0nmV951AwKQSSxOmgCluGj2XNXgoC19+n4rfsJGMaDzs0ePKSNRYiPzTH9MUrS6NZR PcEgBtbKugwHAMa6h4zXj8WrQh2LI7z5a7rcmvBXuWI4HgFRGbHRLzuchoKohHqZhHeS Jned4j41dqJ9Z2bxp+GihVgR4FXYLt40K4HTulK19Uqkhf3G+rvd+NAbV6jB7gcioxeO FWGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:cc:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=vnXc4Yb/pHWEJbtYhNgr22snq77imLXAT0wx5jnwjo4=; b=BAuUkw3zWojCfNx1Cm7cZhvXu0gY8/XJOdjsEJe+f0zuH9wMY68x0tXCoFMishqbjK +nlXjvSsRq6MeRbXTSoLFF9UbATsVu/N+xII3GPYpvm0hMDloggilga6PeMwZ113bhN8 9qxnDXmafHGFO8RboOSWbl3E2lBD9OFyK+vsQORKXNuxbnXTpp6dLZiWzbgx/fScfAUe wdwRZVqYFkhiuZSN37oERnOMp5mpxZySYNmpnCdGvrwfRoCrK3sbgmbqoJG3mFaO3o1O CONaBYiTZIbcjPpHc2AxRoLN8wSPeqrAyxgd0S+94Dyee5yfaI2dTID3ipF7SeA+DoZP HNMw== X-Gm-Message-State: AOAM5336ChCy+rehnJqKy4qoQ/vq2iHawgjgvYl6RChBepjQ0FpNioNz nzufBNvMDSc8F0jQw9ILFAdneA== X-Google-Smtp-Source: ABdhPJxkHI1h5rz49kru4VGjnkNJZGc9th9IAYmKC00kH6R0URgc0rcm+/X3Tm0gKhPecXYp9CDuVw== X-Received: by 2002:a17:906:b752:: with SMTP id fx18mr3011776ejb.128.1615466414609; Thu, 11 Mar 2021 04:40:14 -0800 (PST) Return-Path: Received: from ?IPv6:2003:d2:6708:9100:d138:e146:8bec:b02a? (p200300d267089100d138e1468becb02a.dip0.t-ipconnect.de. [2003:d2:6708:9100:d138:e146:8bec:b02a]) by smtp.gmail.com with ESMTPSA id bm6sm1255651ejb.50.2021.03.11.04.40.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Mar 2021 04:40:14 -0800 (PST) To: devel@edk2.groups.io From: treffer+groups.io@measite.de Subject: [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix dwc2 reset on raspberry pi boards Cc: Pete Batard , Leif Lindholm , Ard Biesheuvel Message-ID: <7669a539-91a0-7b48-a6b7-897dbfeda3ae@measite.de> Date: Thu, 11 Mar 2021 13:40:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 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 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