Update USB init code to do a softreset.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10208 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish 2010-03-05 07:10:52 +00:00
parent 0c1a4aa69a
commit 51866b5465
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#define UHH_SYSCONFIG_CLOCKACTIVITY_ON (1UL << 8)
#define UHH_SYSCONFIG_SIDLEMODE_NO_STANDBY (1UL << 3)
#define UHH_SYSCONFIG_ENAWAKEUP_ENABLE (1UL << 2)
#define UHH_SYSCONFIG_SOFTRESET (1UL << 1)
#define UHH_SYSCONFIG_AUTOIDLE_ALWAYS_RUN (0UL << 0)
#define UHH_HOSTCONFIG_P3_CONNECT_STATUS_DISCONNECT (0UL << 10)

View File

@ -62,6 +62,12 @@ ConfigureUSBHost (
EFI_STATUS Status;
UINT8 Data = 0;
// Do a softreset
MmioOr32 (UHH_SYSCONFIG, UHH_SYSCONFIG_SOFTRESET);
// When the bit clears reset is complete
while ((MmioRead32 (UHH_SYSCONFIG) & UHH_SYSCONFIG_SOFTRESET) == UHH_SYSCONFIG_SOFTRESET);
// Take USB host out of force-standby mode
MmioWrite32 (UHH_SYSCONFIG, UHH_SYSCONFIG_MIDLEMODE_NO_STANDBY
| UHH_SYSCONFIG_CLOCKACTIVITY_ON