1) Fix a typo in EhcMoniteAsyncRequests.

2) Code cleanup.
3) Doxygen comment cleanup.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7428 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2009-02-04 06:56:31 +00:00
parent e01fb259f8
commit 597f4ee21c
13 changed files with 25 additions and 104 deletions

View File

@ -2,7 +2,7 @@
The Ehci controller driver.
Copyright (c) 2006 - 2008, Intel Corporation
Copyright (c) 2006 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -1436,7 +1436,7 @@ EhcCreateUsb2Hc (
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
EhcMoniteAsyncRequests,
EhcMonitorAsyncRequests,
Ehc,
&Ehc->PollTimer
);

View File

@ -2,7 +2,7 @@
Provides some data struct used by EHCI controller driver.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -67,14 +67,12 @@ typedef enum {
} EHC_TIMEOUT_EXPERIENCE_VALUE;
//
// EHC raises TPL to TPL_NOTIFY to serialize all its operations
// to protect shared data structures.
//
//
// EHC raises TPL to TPL_NOTIFY to serialize all its operations
// to protect shared data structures.
//
#define EHC_TPL TPL_NOTIFY
#define USB2_HC_DEV_SIGNATURE SIGNATURE_32 ('e', 'h', 'c', 'i')
//
//Iterate through the doule linked list. NOT delete safe
//
@ -99,7 +97,8 @@ typedef enum {
#define EHC_REG_BIT_IS_SET(Ehc, Offset, Bit) \
(EHC_BIT_IS_SET(EhcReadOpReg ((Ehc), (Offset)), (Bit)))
#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)
#define USB2_HC_DEV_SIGNATURE SIGNATURE_32 ('e', 'h', 'c', 'i')
#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)
struct _USB2_HC_DEV {
UINTN Signature;

View File

@ -2,7 +2,7 @@
This file provides the information dump support for EHCI when in debug mode.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param State The state in the QTD/QH.
@return None.
**/
VOID
EhcDumpStatus (
@ -71,8 +69,6 @@ EhcDumpStatus (
@param Qtd The QTD to dump.
@param Msg The message to print before the dump.
@return None
**/
VOID
EhcDumpQtd (
@ -126,8 +122,6 @@ EhcDumpQtd (
@param Msg The message to print before the dump.
@param DumpBuf Whether to dump the memory buffer of the associated QTD.
@return None
**/
VOID
EhcDumpQh (
@ -214,8 +208,6 @@ EhcDumpQh (
@param Buf The buffer to dump.
@param Len The length of buffer.
@return None.
**/
VOID
EhcDumpBuf (

View File

@ -2,7 +2,7 @@
This file contains the definination for host controller debug support routines.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -23,8 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param Qtd The QTD to dump.
@param Msg The message to print before the dump.
@return None.
**/
VOID
EhcDumpQtd (
@ -40,8 +38,6 @@ EhcDumpQtd (
@param Msg The message to print before the dump.
@param DumpBuf Whether to dump the memory buffer of the associated QTD.
@return None.
**/
VOID
EhcDumpQh (
@ -57,8 +53,6 @@ EhcDumpQh (
@param Buf The buffer to dump.
@param Len The length of buffer.
@return None.
**/
VOID
EhcDumpBuf (

View File

@ -6,7 +6,7 @@
# It implements the interfaces of monitoring the status of all ports and transferring
# Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device.
#
# Copyright (c) 2006 - 2008, Intel Corporation.
# Copyright (c) 2006 - 2009, 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
@ -72,8 +72,8 @@
PcdLib
[Protocols]
gEfiPciIoProtocolGuid ## ALWAYS_CONSUMED
gEfiUsb2HcProtocolGuid ## ALWAYS_PRODUCED
gEfiPciIoProtocolGuid ## CONSUMES
gEfiUsb2HcProtocolGuid ## PRODUCES
# [Event]
# ##

View File

@ -2,7 +2,7 @@
The EHCI register operation routines.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -100,8 +100,6 @@ EhcReadOpReg (
@param Offset EHCI operation register offset.
@param Data The data to write.
@return None.
**/
VOID
EhcWriteOpReg (
@ -136,8 +134,6 @@ EhcWriteOpReg (
@param Offset The offset of the operational register.
@param Bit The bit mask of the register to set.
@return None.
**/
VOID
EhcSetOpRegBit (
@ -161,8 +157,6 @@ EhcSetOpRegBit (
@param Offset The offset of the operational register.
@param Bit The bit mask of the register to clear.
@return None.
**/
VOID
EhcClearOpRegBit (
@ -222,8 +216,6 @@ EhcWaitOpRegBit (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhcClearLegacySupport (
@ -308,8 +300,6 @@ EhcSetAndWaitDoorBell (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhcAckAllInterrupt (

View File

@ -2,7 +2,7 @@
This file contains the definination for host controller register operation routines.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -154,8 +154,6 @@ EhcReadOpReg (
@param Offset EHCI operation register offset.
@param Data The data to write.
@return None.
**/
VOID
EhcWriteOpReg (
@ -171,8 +169,6 @@ EhcWriteOpReg (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhcClearLegacySupport (
@ -204,8 +200,6 @@ EhcSetAndWaitDoorBell (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhcAckAllInterrupt (

View File

@ -2,7 +2,7 @@
EHCI transfer scheduling routines.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -208,8 +208,6 @@ EhcInitSched (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhcFreeSched (
@ -268,8 +266,6 @@ EhcFreeSched (
@param Ehc The EHCI device.
@param Qh The queue head to link.
@return None.
**/
VOID
EhcLinkQhToAsync (
@ -301,8 +297,6 @@ EhcLinkQhToAsync (
@param Ehc The EHCI device.
@param Qh The queue head to unlink.
@return None.
**/
VOID
EhcUnlinkQhFromAsync (
@ -346,8 +340,6 @@ EhcUnlinkQhFromAsync (
@param Ehc The EHCI device.
@param Qh The queue head to link.
@return None.
**/
VOID
EhcLinkQhToPeriod (
@ -447,8 +439,6 @@ EhcLinkQhToPeriod (
@param Ehc The EHCI device.
@param Qh The queue head to unlink.
@return None.
**/
VOID
EhcUnlinkQhFromPeriod (
@ -734,8 +724,6 @@ EhciDelAsyncIntTransfer (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhciDelAllAsyncIntTransfers (
@ -817,8 +805,6 @@ ON_ERROR:
@param Urb The URB to update.
@return None.
**/
VOID
EhcUpdateAsyncRequest (
@ -895,11 +881,9 @@ EhcUpdateAsyncRequest (
@param Event Interrupt event.
@param Context Pointer to USB2_HC_DEV.
@return None.
**/
VOID
EhcMoniteAsyncRequests (
EhcMonitorAsyncRequests (
IN EFI_EVENT Event,
IN VOID *Context
)
@ -935,7 +919,7 @@ EhcMoniteAsyncRequests (
//
Status = EhcFlushAsyncIntMap (Ehc, Urb);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "EhcMoniteAsyncRequests: Fail to Flush AsyncInt Mapped Memeory\n"));
DEBUG ((EFI_D_ERROR, "EhcMonitorAsyncRequests: Fail to Flush AsyncInt Mapped Memeory\n"));
}
//

View File

@ -2,7 +2,7 @@
This file contains the definination for host controller schedule routines.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -37,8 +37,6 @@ EhcInitSched (
@param Ehc The EHCI device.
@return None
**/
VOID
EhcFreeSched (
@ -56,8 +54,6 @@ EhcFreeSched (
@param Ehc The EHCI device.
@param Qh The queue head to link.
@return None.
**/
VOID
EhcLinkQhToAsync (
@ -73,8 +69,6 @@ EhcLinkQhToAsync (
@param Ehc The EHCI device.
@param Qh The queue head to unlink.
@return None.
**/
VOID
EhcUnlinkQhFromAsync (
@ -91,8 +85,6 @@ EhcUnlinkQhFromAsync (
@param Ehc The EHCI device.
@param Qh The queue head to link.
@return None.
**/
VOID
EhcLinkQhToPeriod (
@ -108,8 +100,6 @@ EhcLinkQhToPeriod (
@param Ehc The EHCI device.
@param Qh The queue head to unlink.
@return None.
**/
VOID
EhcUnlinkQhFromPeriod (
@ -166,8 +156,6 @@ EhciDelAsyncIntTransfer (
@param Ehc The EHCI device.
@return None.
**/
VOID
EhciDelAllAsyncIntTransfers (
@ -181,11 +169,9 @@ EhciDelAllAsyncIntTransfers (
@param Event Interrupt event.
@param Context Pointer to USB2_HC_DEV.
@return None.
**/
VOID
EhcMoniteAsyncRequests (
EhcMonitorAsyncRequests (
IN EFI_EVENT Event,
IN VOID *Context
);

View File

@ -3,7 +3,7 @@
This file contains URB request, each request is warpped in a
URB (Usb Request Block).
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -125,8 +125,6 @@ EhcCreateQtd (
@param Ep The queue head's related endpoint.
@param QhHw The queue head to initialize.
@return None.
**/
VOID
EhcInitIntQh (
@ -293,8 +291,6 @@ EhcConvertPollRate (
@param Ehc The EHCI device.
@param Qtds The list head of the QTD.
@return None.
**/
VOID
EhcFreeQtds (
@ -321,8 +317,6 @@ EhcFreeQtds (
@param Ehc The EHCI device.
@param Urb The URB to free.
@return None.
**/
VOID
EhcFreeUrb (

View File

@ -3,7 +3,7 @@
This file contains URB request, each request is warpped in a
URB (Usb Request Block).
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -287,8 +287,6 @@ EhcCreateQh (
@param Ehc The EHCI device.
@param Urb The URB to free.
@return None.
**/
VOID
EhcFreeUrb (

View File

@ -2,7 +2,7 @@
Routine procedures for memory allocate/free.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -124,8 +124,6 @@ FREE_BITARRAY:
@param Pool The memory pool to free the block from.
@param Block The memory block to free.
@return None.
**/
VOID
UsbHcFreeMemBlock (
@ -230,8 +228,6 @@ UsbHcAllocMemFromBlock (
@param Head The head of the memory pool's block list.
@param Block The memory block to insert.
@return None.
**/
VOID
UsbHcInsertMemBlockToPool (
@ -277,8 +273,6 @@ UsbHcIsMemBlockEmpty (
@param Head The block list head of the memory's pool.
@param BlockToUnlink The memory block to unlink.
@return None.
**/
VOID
UsbHcUnlinkMemBlock (
@ -459,8 +453,6 @@ UsbHcAllocateMem (
@param Mem The memory to free.
@param Size The size of the memory to free.
@return None.
**/
VOID
UsbHcFreeMem (

View File

@ -2,7 +2,7 @@
This file contains the definination for host controller memory management routines.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007 - 2009, 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
which accompanies this distribution. The full text of the license may be found at
@ -133,8 +133,6 @@ UsbHcAllocateMem (
@param Mem The memory to free.
@param Size The size of the memory to free.
@return None.
**/
VOID
UsbHcFreeMem (