modify coding style to pass ecc tool and provide comments that complied with Doxgen.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5429 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/** @file
|
||||
|
||||
The UHCI register operation routines.
|
||||
|
||||
Copyright (c) 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -9,29 +11,18 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
UhciReg.c
|
||||
|
||||
Abstract:
|
||||
|
||||
The UHCI register operation routines.
|
||||
|
||||
Revision History
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Uhci.h"
|
||||
|
||||
|
||||
/**
|
||||
Read a UHCI register
|
||||
Read a UHCI register.
|
||||
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use
|
||||
@param Offset Register offset to USB_BAR_INDEX
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use.
|
||||
@param Offset Register offset to USB_BAR_INDEX.
|
||||
|
||||
@return Content of register
|
||||
@return Content of register.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
@@ -63,13 +54,13 @@ UhciReadReg (
|
||||
|
||||
|
||||
/**
|
||||
Write data to UHCI register
|
||||
Write data to UHCI register.
|
||||
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use
|
||||
@param Offset Register offset to USB_BAR_INDEX
|
||||
@param Data Data to write
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use.
|
||||
@param Offset Register offset to USB_BAR_INDEX.
|
||||
@param Data Data to write.
|
||||
|
||||
@return VOID
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -97,13 +88,13 @@ UhciWriteReg (
|
||||
|
||||
|
||||
/**
|
||||
Set a bit of the UHCI Register
|
||||
Set a bit of the UHCI Register.
|
||||
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use
|
||||
@param Offset Register offset to USB_BAR_INDEX
|
||||
@param Bit The bit to set
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use.
|
||||
@param Offset Register offset to USB_BAR_INDEX.
|
||||
@param Bit The bit to set.
|
||||
|
||||
@return None
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -122,13 +113,13 @@ UhciSetRegBit (
|
||||
|
||||
|
||||
/**
|
||||
Clear a bit of the UHCI Register
|
||||
Clear a bit of the UHCI Register.
|
||||
|
||||
@param PciIo The PCI_IO protocol to access the PCI
|
||||
@param Offset Register offset to USB_BAR_INDEX
|
||||
@param Bit The bit to clear
|
||||
@param PciIo The PCI_IO protocol to access the PCI.
|
||||
@param Offset Register offset to USB_BAR_INDEX.
|
||||
@param Bit The bit to clear.
|
||||
|
||||
@return None
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -148,11 +139,11 @@ UhciClearRegBit (
|
||||
|
||||
/**
|
||||
Clear all the interrutp status bits, these bits
|
||||
are Write-Clean
|
||||
are Write-Clean.
|
||||
|
||||
@param Uhc The UHCI device
|
||||
@param Uhc The UHCI device.
|
||||
|
||||
@return None
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -173,15 +164,14 @@ UhciAckAllInterrupt (
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Stop the host controller
|
||||
Stop the host controller.
|
||||
|
||||
@param Uhc The UHCI device
|
||||
@param Timeout Max time allowed
|
||||
@param Uhc The UHCI device.
|
||||
@param Timeout Max time allowed.
|
||||
|
||||
@retval EFI_SUCCESS The host controller is stopped
|
||||
@retval EFI_TIMEOUT Failed to stop the host controller
|
||||
@retval EFI_SUCCESS The host controller is stopped.
|
||||
@retval EFI_TIMEOUT Failed to stop the host controller.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -214,12 +204,12 @@ UhciStopHc (
|
||||
|
||||
|
||||
/**
|
||||
Check whether the host controller operates well
|
||||
Check whether the host controller operates well.
|
||||
|
||||
@param PciIo The PCI_IO protocol to use
|
||||
@param PciIo The PCI_IO protocol to use.
|
||||
|
||||
@retval TRUE Host controller is working
|
||||
@retval FALSE Host controller is halted or system error
|
||||
@retval TRUE Host controller is working.
|
||||
@retval FALSE Host controller is halted or system error.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
@@ -231,7 +221,7 @@ UhciIsHcWorking (
|
||||
|
||||
UsbSts = UhciReadReg (PciIo, USBSTS_OFFSET);
|
||||
|
||||
if (UsbSts & (USBSTS_HCPE | USBSTS_HSE | USBSTS_HCH)) {
|
||||
if ((UsbSts & (USBSTS_HCPE | USBSTS_HSE | USBSTS_HCH)) != 0) {
|
||||
DEBUG ((EFI_D_ERROR, "UhciIsHcWorking: current USB state is %x\n", UsbSts));
|
||||
return FALSE;
|
||||
}
|
||||
@@ -244,10 +234,10 @@ UhciIsHcWorking (
|
||||
Set the UHCI frame list base address. It can't use
|
||||
UhciWriteReg which access memory in UINT16.
|
||||
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use
|
||||
@param Addr Address to set
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL to use.
|
||||
@param Addr Address to set.
|
||||
|
||||
@return VOID
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -277,11 +267,11 @@ UhciSetFrameListBaseAddr (
|
||||
|
||||
|
||||
/**
|
||||
Disable USB Emulation
|
||||
Disable USB Emulation.
|
||||
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL protocol to use
|
||||
@param PciIo The EFI_PCI_IO_PROTOCOL protocol to use.
|
||||
|
||||
@return VOID
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
Reference in New Issue
Block a user