/** @file\r
\r
+ The UHCI register operation routines.\r
+\r
Copyright (c) 2007 - 2008, 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
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
- UhciQueue.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
- Map address of request structure buffer\r
+ Map address of request structure buffer.\r
\r
- @param Uhc The UHCI device\r
- @param Request The user request buffer\r
- @param MappedAddr Mapped address of request\r
- @param Map Identificaion of this mapping to return\r
+ @param Uhc The UHCI device.\r
+ @param Request The user request buffer.\r
+ @param MappedAddr Mapped address of request.\r
+ @param Map Identificaion of this mapping to return.\r
\r
- @return EFI_SUCCESS : Success\r
- @return EFI_DEVICE_ERROR : Fail to map the user request\r
+ @return EFI_SUCCESS Success.\r
+ @return EFI_DEVICE_ERROR Fail to map the user request.\r
\r
**/\r
EFI_STATUS\r
\r
\r
/**\r
- Map address of user data buffer\r
+ Map address of user data buffer.\r
\r
- @param Uhc The UHCI device\r
- @param Direction direction of the data transfer\r
- @param Data The user data buffer\r
- @param Len Length of the user data\r
- @param PktId Packet identificaion\r
- @param MappedAddr mapped address to return\r
- @param Map identificaion of this mapping to return\r
+ @param Uhc The UHCI device.\r
+ @param Direction Direction of the data transfer.\r
+ @param Data The user data buffer.\r
+ @param Len Length of the user data.\r
+ @param PktId Packet identificaion.\r
+ @param MappedAddr Mapped address to return.\r
+ @param Map Identificaion of this mapping to return.\r
\r
- @return EFI_SUCCESS : Success\r
- @return EFI_DEVICE_ERROR : Fail to map the user data\r
+ @return EFI_SUCCESS Success.\r
+ @return EFI_DEVICE_ERROR Fail to map the user data.\r
\r
**/\r
EFI_STATUS\r
}\r
\r
\r
-\r
/**\r
- Link the TD To QH\r
+ Link the TD To QH.\r
\r
- @param Qh The queue head for the TD to link to\r
- @param Td The TD to link\r
+ @param Qh The queue head for the TD to link to.\r
+ @param Td The TD to link.\r
\r
- @return VOID\r
+ @return None.\r
\r
**/\r
VOID\r
\r
\r
/**\r
- Unlink TD from the QH\r
+ Unlink TD from the QH.\r
\r
- @param Qh The queue head to unlink from\r
- @param Td The TD to unlink\r
+ @param Qh The queue head to unlink from.\r
+ @param Td The TD to unlink.\r
\r
- @return VOID\r
+ @return None.\r
\r
**/\r
VOID\r
\r
\r
/**\r
- Append a new TD To the previous TD\r
+ Append a new TD To the previous TD.\r
\r
- @param PrevTd Previous UHCI_TD_SW to be linked to\r
- @param ThisTd TD to link\r
+ @param PrevTd Previous UHCI_TD_SW to be linked to.\r
+ @param ThisTd TD to link.\r
\r
- @return VOID\r
+ @return None.\r
\r
**/\r
-STATIC\r
VOID\r
UhciAppendTd (\r
IN UHCI_TD_SW *PrevTd,\r
\r
\r
/**\r
- Delete a list of TDs\r
+ Delete a list of TDs.\r
\r
- @param Uhc The UHCI device\r
- @param FirstTd TD link list head\r
+ @param Uhc The UHCI device.\r
+ @param FirstTd TD link list head.\r
\r
- @return VOID\r
+ @return None.\r
\r
**/\r
VOID\r
\r
\r
/**\r
- Create an initialize a new queue head\r
+ Create an initialize a new queue head.\r
\r
- @param Uhc The UHCI device\r
- @param Interval The polling interval for the queue\r
+ @param Uhc The UHCI device.\r
+ @param Interval The polling interval for the queue.\r
\r
- @return The newly created queue header\r
+ @return The newly created queue header.\r
\r
**/\r
UHCI_QH_SW *\r
\r
\r
/**\r
- Create and intialize a TD\r
+ Create and intialize a TD.\r
\r
- @param Uhc The UHCI device\r
+ @param Uhc The UHCI device.\r
\r
- @return The newly allocated and initialized TD\r
+ @return The newly allocated and initialized TD.\r
\r
**/\r
-STATIC\r
UHCI_TD_SW *\r
UhciCreateTd (\r
IN USB_HC_DEV *Uhc\r
\r
\r
/**\r
- Create and initialize a TD for Setup Stage of a control transfer\r
+ Create and initialize a TD for Setup Stage of a control transfer.\r
\r
- @param Uhc The UHCI device\r
- @param DevAddr Device address\r
- @param Request Device request\r
- @param IsLow Full speed or low speed\r
+ @param Uhc The UHCI device.\r
+ @param DevAddr Device address.\r
+ @param Request Device request.\r
+ @param IsLow Full speed or low speed.\r
\r
- @return The created setup Td Pointer\r
+ @return The created setup Td Pointer.\r
\r
**/\r
-STATIC\r
UHCI_TD_SW *\r
UhciCreateSetupTd (\r
IN USB_HC_DEV *Uhc,\r
\r
\r
/**\r
- Create a TD for data\r
+ Create a TD for data.\r
\r
- @param Uhc The UHCI device\r
- @param DevAddr Device address\r
- @param Endpoint Endpoint number\r
- @param DataPtr Data buffer\r
- @param Len Data length\r
- @param PktId Packet ID\r
- @param Toggle Data toggle value\r
- @param IsLow Full speed or low speed\r
+ @param Uhc The UHCI device.\r
+ @param DevAddr Device address.\r
+ @param Endpoint Endpoint number.\r
+ @param DataPtr Data buffer.\r
+ @param Len Data length.\r
+ @param PktId Packet ID.\r
+ @param Toggle Data toggle value.\r
+ @param IsLow Full speed or low speed.\r
\r
- @return Data Td pointer if success, otherwise NUL\r
+ @return Data Td pointer if success, otherwise NULL.\r
\r
**/\r
-STATIC\r
UHCI_TD_SW *\r
UhciCreateDataTd (\r
IN USB_HC_DEV *Uhc,\r
\r
\r
/**\r
- Create TD for the Status Stage of control transfer\r
+ Create TD for the Status Stage of control transfer.\r
\r
- @param Uhc The UHCI device\r
- @param DevAddr Device address\r
- @param PktId Packet ID\r
- @param IsLow Full speed or low speed\r
+ @param Uhc The UHCI device.\r
+ @param DevAddr Device address.\r
+ @param PktId Packet ID.\r
+ @param IsLow Full speed or low speed.\r
\r
- @return Status Td Pointer\r
+ @return Status Td Pointer.\r
\r
**/\r
-STATIC\r
UHCI_TD_SW *\r
UhciCreateStatusTd (\r
IN USB_HC_DEV *Uhc,\r
\r
\r
/**\r
- Create Tds list for Control Transfer\r
+ Create Tds list for Control Transfer.\r
\r
- @param Uhc The UHCI device\r
- @param DeviceAddr The device address\r
- @param DataPktId Packet Identification of Data Tds\r
- @param Request A pointer to request structure buffer to transfer\r
- @param Data A pointer to user data buffer to transfer\r
- @param DataLen Length of user data to transfer\r
- @param MaxPacket Maximum packet size for control transfer\r
- @param IsLow Full speed or low speed\r
+ @param Uhc The UHCI device.\r
+ @param DeviceAddr The device address.\r
+ @param DataPktId Packet Identification of Data Tds.\r
+ @param Request A pointer to request structure buffer to transfer.\r
+ @param Data A pointer to user data buffer to transfer.\r
+ @param DataLen Length of user data to transfer.\r
+ @param MaxPacket Maximum packet size for control transfer.\r
+ @param IsLow Full speed or low speed.\r
\r
- @return The Td list head for the control transfer\r
+ @return The Td list head for the control transfer.\r
\r
**/\r
UHCI_TD_SW *\r
\r
\r
/**\r
- Create Tds list for Bulk/Interrupt Transfer\r
-\r
- @param Uhc USB_HC_DEV\r
- @param DevAddr Address of Device\r
- @param EndPoint Endpoint Number\r
- @param PktId Packet Identification of Data Tds\r
- @param Data A pointer to user data buffer to transfer\r
- @param DataLen Length of user data to transfer\r
- @param DataToggle Data Toggle Pointer\r
- @param MaxPacket Maximum packet size for Bulk/Interrupt transfer\r
- @param IsLow Is Low Speed Device\r
-\r
- @return The Tds list head for the bulk transfer\r
+ Create Tds list for Bulk/Interrupt Transfer.\r
+\r
+ @param Uhc USB_HC_DEV.\r
+ @param DevAddr Address of Device.\r
+ @param EndPoint Endpoint Number.\r
+ @param PktId Packet Identification of Data Tds.\r
+ @param Data A pointer to user data buffer to transfer.\r
+ @param DataLen Length of user data to transfer.\r
+ @param DataToggle Data Toggle Pointer.\r
+ @param MaxPacket Maximum packet size for Bulk/Interrupt transfer.\r
+ @param IsLow Is Low Speed Device.\r
+\r
+ @return The Tds list head for the bulk transfer.\r
\r
**/\r
UHCI_TD_SW *\r