summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c')
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c90
1 files changed, 40 insertions, 50 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
index 0742f209d8..25a48f8374 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
@@ -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