]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
modify coding style to pass ecc tool and provide comments that complied with Doxgen.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / EhciReg.h
index 929bd22a375f24ffbf63214ccecb0c3167e80adc..00406e549b7f8a8208f082745d9686297b49fbd4 100644 (file)
@@ -1,5 +1,7 @@
 /** @file\r
 \r
+  This file contains the definination for host controller register operation routines.\r
+\r
 Copyright (c) 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -9,23 +11,13 @@ 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
-  EhciReg.h\r
-\r
-Abstract:\r
-\r
-  This file contains the definination for host controller register operation routines\r
-\r
-Revision History\r
-\r
 **/\r
 \r
 #ifndef _EFI_EHCI_REG_H_\r
 #define _EFI_EHCI_REG_H_\r
 \r
 \r
-enum {\r
+typedef enum {\r
   //\r
   // Capability register offset\r
   //\r
@@ -94,7 +86,7 @@ enum {
   EHC_PCI_CLASSC          = 0x09,\r
   EHC_PCI_CLASSC_PI       = 0x20,\r
   EHC_BAR_INDEX           = 0 /* how many bytes away from USB_BASE to 0x10 */\r
-};\r
+}EHCI_REGISTER_OFFSET;\r
 \r
 #define EHC_LINK_TERMINATED(Link) (((Link) & 0x01) != 0)\r
 \r
@@ -123,38 +115,30 @@ typedef struct {
 } USB_CLASSC;\r
 #pragma pack()\r
 \r
+/**\r
+  Read EHCI capability register.\r
+\r
+  @param  Ehc     The EHCI device.\r
+  @param  Offset  Capability register address.\r
+\r
+  @return The register content.\r
 \r
+**/\r
 UINT32\r
 EhcReadCapRegister (\r
   IN  USB2_HC_DEV         *Ehc,\r
   IN  UINT32              Offset\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Read  EHCI capability register\r
-\r
-Arguments:\r
-\r
-  Ehc     - The Ehc device\r
-  Offset  - Capability register address\r
-\r
-Returns:\r
-\r
-  The register content read\r
-\r
---*/\r
 ;\r
 \r
 \r
 /**\r
-  Read  Ehc Operation register\r
+  Read EHCI Operation register.\r
 \r
-  @param  Ehc      The EHCI device\r
-  @param  Offset   The operation register offset\r
+  @param  Ehc      The EHCI device.\r
+  @param  Offset   The operation register offset.\r
 \r
-  @return The register content read\r
+  @return The register content.\r
 \r
 **/\r
 UINT32\r
@@ -166,13 +150,13 @@ EhcReadOpReg (
 \r
 \r
 /**\r
-  Write  the data to the EHCI operation register\r
+  Write  the data to the EHCI operation register.\r
 \r
-  @param  Ehc      The EHCI device\r
-  @param  Offset   EHCI operation register offset\r
-  @param  Data     The data to write\r
+  @param  Ehc      The EHCI device.\r
+  @param  Offset   EHCI operation register offset.\r
+  @param  Data     The data to write.\r
 \r
-  @return None\r
+  @return None.\r
 \r
 **/\r
 VOID\r
@@ -186,11 +170,11 @@ EhcWriteOpReg (
 \r
 /**\r
   Add support for UEFI Over Legacy (UoL) feature, stop\r
-  the legacy USB SMI support\r
+  the legacy USB SMI support.\r
 \r
   @param  Ehc      The EHCI device.\r
 \r
-  @return None\r
+  @return None.\r
 \r
 **/\r
 VOID\r
@@ -205,11 +189,11 @@ EhcClearLegacySupport (
   Set door bell and wait it to be ACKed by host controller.\r
   This function is used to synchronize with the hardware.\r
 \r
-  @param  Ehc      The EHCI device\r
-  @param  Timeout  The time to wait before abort (in millisecond, ms)\r
+  @param  Ehc          The EHCI device.\r
+  @param  Timeout      The time to wait before abort (in millisecond, ms).\r
 \r
-  @return EFI_SUCCESS : Synchronized with the hardware\r
-  @return EFI_TIMEOUT : Time out happened while waiting door bell to set\r
+  @retval EFI_SUCCESS  Synchronized with the hardware.\r
+  @retval EFI_TIMEOUT  Time out happened while waiting door bell to set.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -221,12 +205,11 @@ EhcSetAndWaitDoorBell (
 \r
 \r
 /**\r
-  Clear all the interrutp status bits, these bits\r
-  are Write-Clean\r
+  Clear all the interrutp status bits, these bits are Write-Clean.\r
 \r
-  @param  Ehc      The EHCI device\r
+  @param  Ehc      The EHCI device.\r
 \r
-  @return None\r
+  @return None.\r
 \r
 **/\r
 VOID\r
@@ -238,12 +221,12 @@ EhcAckAllInterrupt (
 \r
 \r
 /**\r
-  Whether Ehc is halted\r
+  Whether Ehc is halted.\r
 \r
-  @param  Ehc      The EHCI device\r
+  @param  Ehc     The EHCI device.\r
 \r
-  @return TRUE  : The controller is halted\r
-  @return FALSE : It isn't halted\r
+  @retval TRUE    The controller is halted.\r
+  @retval FALSE   It isn't halted.\r
 \r
 **/\r
 BOOLEAN\r
@@ -254,12 +237,12 @@ EhcIsHalt (
 \r
 \r
 /**\r
-  Whether system error occurred\r
+  Whether system error occurred.\r
 \r
-  @param  Ehc      The EHCI device\r
+  @param  Ehc      The EHCI device.\r
 \r
-  @return TRUE  : System error happened\r
-  @return FALSE : No system error\r
+  @retval TRUE     System error happened.\r
+  @retval FALSE    No system error.\r
 \r
 **/\r
 BOOLEAN\r
@@ -269,15 +252,14 @@ EhcIsSysError (
 ;\r
 \r
 \r
-\r
 /**\r
-  Reset the host controller\r
+  Reset the host controller.\r
 \r
-  @param  Ehc      The EHCI device\r
-  @param  Timeout  Time to wait before abort (in millisecond, ms)\r
+  @param  Ehc          The EHCI device.\r
+  @param  Timeout      Time to wait before abort (in millisecond, ms).\r
 \r
-  @return EFI_SUCCESS : The host controller is reset\r
-  @return Others      : Failed to reset the host\r
+  @retval EFI_SUCCESS  The host controller is reset.\r
+  @return Others       Failed to reset the host.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -288,15 +270,14 @@ EhcResetHC (
 ;\r
 \r
 \r
-\r
 /**\r
-  Halt the host controller\r
+  Halt the host controller.\r
 \r
-  @param  Ehc      The EHCI device\r
-  @param  Timeout  Time to wait before abort\r
+  @param  Ehc          The EHCI device.\r
+  @param  Timeout      Time to wait before abort.\r
 \r
-  @return EFI_SUCCESS : The EHCI is halt\r
-  @return EFI_TIMEOUT : Failed to halt the controller before Timeout\r
+  @return EFI_SUCCESS  The EHCI is halt.\r
+  @return EFI_TIMEOUT  Failed to halt the controller before Timeout.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -307,15 +288,14 @@ EhcHaltHC (
 ;\r
 \r
 \r
-\r
 /**\r
-  Set the EHCI to run\r
+  Set the EHCI to run.\r
 \r
-  @param  Ehc      The EHCI device\r
-  @param  Timeout  Time to wait before abort\r
+  @param  Ehc          The EHCI device.\r
+  @param  Timeout      Time to wait before abort.\r
 \r
-  @return EFI_SUCCESS : The EHCI is running\r
-  @return Others      : Failed to set the EHCI to run\r
+  @return EFI_SUCCESS  The EHCI is running.\r
+  @return Others       Failed to set the EHCI to run.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -329,17 +309,17 @@ EhcRunHC (
 \r
 /**\r
   Initialize the HC hardware.\r
-  EHCI spec lists the five things to do to initialize the hardware\r
+  EHCI spec lists the five things to do to initialize the hardware:\r
   1. Program CTRLDSSEGMENT\r
   2. Set USBINTR to enable interrupts\r
   3. Set periodic list base\r
   4. Set USBCMD, interrupt threshold, frame list size etc\r
   5. Write 1 to CONFIGFLAG to route all ports to EHCI\r
 \r
-  @param  Ehc      The EHCI device\r
+  @param  Ehc          The EHCI device.\r
 \r
-  @return EFI_SUCCESS : The EHCI has come out of halt state\r
-  @return EFI_TIMEOUT : Time out happened\r
+  @return EFI_SUCCESS  The EHCI has come out of halt state.\r
+  @return EFI_TIMEOUT  Time out happened.\r
 \r
 **/\r
 EFI_STATUS\r