Revision: 15020
          http://sourceforge.net/p/edk2/code/15020
Author:   li-elvin
Date:     2013-12-25 07:52:55 +0000 (Wed, 25 Dec 2013)
Log Message:
-----------
Update XhcWaitOpRegBit to take Timout argument as microsecond.

Signed-off-by: Elvin Li <elvin...@intel.com>
Reviewed-by: Feng Tian <feng.t...@intel.com>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c
    trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c   2013-12-25 00:55:33 UTC 
(rev 15019)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c   2013-12-25 07:52:55 UTC 
(rev 15020)
@@ -2,7 +2,7 @@
 
   The XHCI register operation routines.
 
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -499,7 +499,7 @@
   @param  Offset       The offset of the operation register.
   @param  Bit          The bit of the register to wait for.
   @param  WaitToSet    Wait the bit to set or clear.
-  @param  Timeout      The time to wait before abort (in millisecond, ms).
+  @param  Timeout      The time to wait before abort (in microsecond, us).
 
   @retval EFI_SUCCESS  The bit successfully changed by host controller.
   @retval EFI_TIMEOUT  The time out occurred.
@@ -517,7 +517,7 @@
   UINT32                  Index;
   UINTN                   Loop;
 
-  Loop   = (Timeout * XHC_1_MILLISECOND / XHC_POLL_DELAY) + 1;
+  Loop   = (Timeout / XHC_POLL_DELAY) + 1;
 
   for (Index = 0; Index < Loop; Index++) {
     if (XHC_REG_BIT_IS_SET (Xhc, Offset, Bit) == WaitToSet) {
@@ -656,7 +656,7 @@
   Reset the XHCI host controller.
 
   @param  Xhc          The XHCI Instance.
-  @param  Timeout      Time to wait before abort (in millisecond, ms).
+  @param  Timeout      Time to wait before abort (in microsecond, us).
 
   @retval EFI_SUCCESS  The XHCI host controller is reset.
   @return Others       Failed to reset the XHCI before Timeout.
@@ -698,7 +698,7 @@
   Halt the XHCI host controller.
 
   @param  Xhc          The XHCI Instance.
-  @param  Timeout      Time to wait before abort (in millisecond, ms).
+  @param  Timeout      Time to wait before abort (in microsecond, us).
 
   @return EFI_SUCCESS  The XHCI host controller is halt.
   @return EFI_TIMEOUT  Failed to halt the XHCI before Timeout.
@@ -722,7 +722,7 @@
   Set the XHCI host controller to run.
 
   @param  Xhc          The XHCI Instance.
-  @param  Timeout      Time to wait before abort (in millisecond, ms).
+  @param  Timeout      Time to wait before abort (in microsecond, us).
 
   @return EFI_SUCCESS  The XHCI host controller is running.
   @return EFI_TIMEOUT  Failed to set the XHCI to run before Timeout.

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h   2013-12-25 00:55:33 UTC 
(rev 15019)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h   2013-12-25 07:52:55 UTC 
(rev 15020)
@@ -399,7 +399,7 @@
   @param  Offset       The offset of the operational register.
   @param  Bit          The bit of the register to wait for.
   @param  WaitToSet    Wait the bit to set or clear.
-  @param  Timeout      The time to wait before abort (in millisecond, ms).
+  @param  Timeout      The time to wait before abort (in microsecond, us).
 
   @retval EFI_SUCCESS  The bit successfully changed by host controller.
   @retval EFI_TIMEOUT  The time out occurred.
@@ -521,7 +521,7 @@
   Reset the XHCI host controller.
 
   @param  Xhc          The XHCI Instance.
-  @param  Timeout      Time to wait before abort (in millisecond, ms).
+  @param  Timeout      Time to wait before abort (in microsecond, us).
 
   @retval EFI_SUCCESS  The XHCI host controller is reset.
   @return Others       Failed to reset the XHCI before Timeout.
@@ -537,7 +537,7 @@
   Halt the XHCI host controller.
 
   @param  Xhc          The XHCI Instance.
-  @param  Timeout      Time to wait before abort (in millisecond, ms).
+  @param  Timeout      Time to wait before abort (in microsecond, us).
 
   @return EFI_SUCCESS  The XHCI host controller is halt.
   @return EFI_TIMEOUT  Failed to halt the XHCI before Timeout.
@@ -553,7 +553,7 @@
   Set the XHCI host controller to run.
 
   @param  Xhc          The XHCI Instance.
-  @param  Timeout      Time to wait before abort (in millisecond, ms).
+  @param  Timeout      Time to wait before abort (in microsecond, us).
 
   @return EFI_SUCCESS  The XHCI host controller is running.
   @return EFI_TIMEOUT  Failed to set the XHCI to run before Timeout.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to