]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
MdeModulePkg UhciPei: Remove redundant functions
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / UhciDxe / UhciReg.c
index 0742f209d8a0e15f28d618bc232a032cbbfb7fe3..0fd16284b3b3069f259dfbd6e60b0068848e8d4a 100644 (file)
@@ -1,7 +1,9 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+  The UHCI register operation routines.\r
+\r
+Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -9,29 +11,18 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  UhciReg.c\r
-\r
-Abstract:\r
-\r
-  The UHCI register operation routines.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 #include "Uhci.h"\r
 \r
 \r
 /**\r
-  Read a UHCI register\r
+  Read a UHCI register.\r
 \r
-  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use\r
-  @param  Offset       Register offset to USB_BAR_INDEX\r
+  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use.\r
+  @param  Offset       Register offset to USB_BAR_INDEX.\r
 \r
-  @return Content of register\r
+  @return Content of register.\r
 \r
 **/\r
 UINT16\r
@@ -63,13 +54,11 @@ UhciReadReg (
 \r
 \r
 /**\r
-  Write data to UHCI register\r
-\r
-  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use\r
-  @param  Offset       Register offset to USB_BAR_INDEX\r
-  @param  Data         Data to write\r
+  Write data to UHCI register.\r
 \r
-  @return VOID\r
+  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use.\r
+  @param  Offset       Register offset to USB_BAR_INDEX.\r
+  @param  Data         Data to write.\r
 \r
 **/\r
 VOID\r
@@ -97,13 +86,11 @@ UhciWriteReg (
 \r
 \r
 /**\r
-  Set a bit of the UHCI Register\r
+  Set a bit of the UHCI Register.\r
 \r
-  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use\r
-  @param  Offset       Register offset to USB_BAR_INDEX\r
-  @param  Bit          The bit to set\r
-\r
-  @return None\r
+  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use.\r
+  @param  Offset       Register offset to USB_BAR_INDEX.\r
+  @param  Bit          The bit to set.\r
 \r
 **/\r
 VOID\r
@@ -122,13 +109,11 @@ UhciSetRegBit (
 \r
 \r
 /**\r
-  Clear a bit of the UHCI Register\r
-\r
-  @param  PciIo        The PCI_IO protocol to access the PCI\r
-  @param  Offset       Register offset to USB_BAR_INDEX\r
-  @param  Bit          The bit to clear\r
+  Clear a bit of the UHCI Register.\r
 \r
-  @return None\r
+  @param  PciIo        The PCI_IO protocol to access the PCI.\r
+  @param  Offset       Register offset to USB_BAR_INDEX.\r
+  @param  Bit          The bit to clear.\r
 \r
 **/\r
 VOID\r
@@ -148,11 +133,9 @@ UhciClearRegBit (
 \r
 /**\r
   Clear all the interrutp status bits, these bits\r
-  are Write-Clean\r
+  are Write-Clean.\r
 \r
-  @param  Uhc          The UHCI device\r
-\r
-  @return None\r
+  @param  Uhc          The UHCI device.\r
 \r
 **/\r
 VOID\r
@@ -173,15 +156,14 @@ UhciAckAllInterrupt (
 }\r
 \r
 \r
-\r
 /**\r
-  Stop the host controller\r
+  Stop the host controller.\r
 \r
-  @param  Uhc          The UHCI device\r
-  @param  Timeout      Max time allowed\r
+  @param  Uhc          The UHCI device.\r
+  @param  Timeout      Max time allowed.\r
 \r
-  @retval EFI_SUCCESS  The host controller is stopped\r
-  @retval EFI_TIMEOUT  Failed to stop the host controller\r
+  @retval EFI_SUCCESS  The host controller is stopped.\r
+  @retval EFI_TIMEOUT  Failed to stop the host controller.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -214,12 +196,12 @@ UhciStopHc (
 \r
 \r
 /**\r
-  Check whether the host controller operates well\r
+  Check whether the host controller operates well.\r
 \r
-  @param  PciIo        The PCI_IO protocol to use\r
+  @param  PciIo        The PCI_IO protocol to use.\r
 \r
-  @retval TRUE         Host controller is working\r
-  @retval FALSE        Host controller is halted or system error\r
+  @retval TRUE         Host controller is working.\r
+  @retval FALSE        Host controller is halted or system error.\r
 \r
 **/\r
 BOOLEAN\r
@@ -231,7 +213,7 @@ UhciIsHcWorking (
 \r
   UsbSts = UhciReadReg (PciIo, USBSTS_OFFSET);\r
 \r
-  if (UsbSts & (USBSTS_HCPE | USBSTS_HSE | USBSTS_HCH)) {\r
+  if ((UsbSts & (USBSTS_HCPE | USBSTS_HSE | USBSTS_HCH)) != 0) {\r
     DEBUG ((EFI_D_ERROR, "UhciIsHcWorking: current USB state is %x\n", UsbSts));\r
     return FALSE;\r
   }\r
@@ -244,10 +226,8 @@ UhciIsHcWorking (
   Set the UHCI frame list base address. It can't use\r
   UhciWriteReg which access memory in UINT16.\r
 \r
-  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use\r
-  @param  Addr         Address to set\r
-\r
-  @return VOID\r
+  @param  PciIo        The EFI_PCI_IO_PROTOCOL to use.\r
+  @param  Addr         Address to set.\r
 \r
 **/\r
 VOID\r
@@ -277,11 +257,9 @@ UhciSetFrameListBaseAddr (
 \r
 \r
 /**\r
-  Disable USB Emulation\r
-\r
-  @param  PciIo        The EFI_PCI_IO_PROTOCOL protocol to use\r
+  Disable USB Emulation.\r
 \r
-  @return VOID\r
+  @param  PciIo        The EFI_PCI_IO_PROTOCOL protocol to use.\r
 \r
 **/\r
 VOID\r