Add function doxygen header for PciBus module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5066 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
/**@file
|
||||
|
||||
This module implement Pci register operation interface for
|
||||
Pci device.
|
||||
|
||||
Copyright (c) 2006, 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
|
||||
@ -14,6 +16,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
#include "pcibus.h"
|
||||
|
||||
/**
|
||||
Operate the PCI register via PciIo function interface.
|
||||
|
||||
@param PciIoDevice Pointer to instance of PCI_IO_DEVICE
|
||||
@param Command Operator command
|
||||
@param Offset The address within the PCI configuration space for the PCI controller.
|
||||
@param Operation Type of Operation
|
||||
@param PtrCommand Return buffer holding old PCI command, if operation is not EFI_SET_REGISTER
|
||||
|
||||
@return status of PciIo operation
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciOperateRegister (
|
||||
IN PCI_IO_DEVICE *PciIoDevice,
|
||||
@ -22,22 +35,6 @@ PciOperateRegister (
|
||||
IN UINT8 Operation,
|
||||
OUT UINT16 *PtrCommand
|
||||
)
|
||||
/**
|
||||
|
||||
Routine Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
**/
|
||||
// TODO: PciIoDevice - add argument and description to function comment
|
||||
// TODO: Command - add argument and description to function comment
|
||||
// TODO: Offset - add argument and description to function comment
|
||||
// TODO: Operation - add argument and description to function comment
|
||||
// TODO: PtrCommand - add argument and description to function comment
|
||||
{
|
||||
UINT16 OldCommand;
|
||||
EFI_STATUS Status;
|
||||
@ -48,12 +45,12 @@ Returns:
|
||||
|
||||
if (Operation != EFI_SET_REGISTER) {
|
||||
Status = PciIoRead (
|
||||
PciIo,
|
||||
EfiPciIoWidthUint16,
|
||||
Offset,
|
||||
1,
|
||||
&OldCommand
|
||||
);
|
||||
PciIo,
|
||||
EfiPciIoWidthUint16,
|
||||
Offset,
|
||||
1,
|
||||
&OldCommand
|
||||
);
|
||||
|
||||
if (Operation == EFI_GET_REGISTER) {
|
||||
*PtrCommand = OldCommand;
|
||||
@ -70,30 +67,26 @@ Returns:
|
||||
}
|
||||
|
||||
return PciIoWrite (
|
||||
PciIo,
|
||||
EfiPciIoWidthUint16,
|
||||
Offset,
|
||||
1,
|
||||
&OldCommand
|
||||
);
|
||||
PciIo,
|
||||
EfiPciIoWidthUint16,
|
||||
Offset,
|
||||
1,
|
||||
&OldCommand
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
check the cpability of this device supports
|
||||
|
||||
@param PciIoDevice Pointer to instance of PCI_IO_DEVICE
|
||||
|
||||
@retval TRUE Support
|
||||
@retval FALSE Not support
|
||||
**/
|
||||
BOOLEAN
|
||||
PciCapabilitySupport (
|
||||
IN PCI_IO_DEVICE *PciIoDevice
|
||||
)
|
||||
/**
|
||||
|
||||
Routine Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
**/
|
||||
// TODO: PciIoDevice - add argument and description to function comment
|
||||
{
|
||||
|
||||
if (PciIoDevice->Pci.Hdr.Status & EFI_PCI_STATUS_CAPABILITY) {
|
||||
@ -103,6 +96,18 @@ Returns:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
Locate cap reg.
|
||||
|
||||
@param PciIoDevice - A pointer to the PCI_IO_DEVICE.
|
||||
@param CapId - The cap ID.
|
||||
@param Offset - A pointer to the offset.
|
||||
@param NextRegBlock - A pointer to the next block.
|
||||
|
||||
@retval EFI_UNSUPPORTED Pci device does not support
|
||||
@retval EFI_NOT_FOUND Pci device support but can not find register block.
|
||||
@retval EFI_SUCCESS Success to locate capability register block
|
||||
**/
|
||||
EFI_STATUS
|
||||
LocateCapabilityRegBlock (
|
||||
IN PCI_IO_DEVICE *PciIoDevice,
|
||||
@ -110,25 +115,6 @@ LocateCapabilityRegBlock (
|
||||
IN OUT UINT8 *Offset,
|
||||
OUT UINT8 *NextRegBlock OPTIONAL
|
||||
)
|
||||
/**
|
||||
|
||||
Routine Description:
|
||||
Locate cap reg.
|
||||
|
||||
Arguments:
|
||||
PciIoDevice - A pointer to the PCI_IO_DEVICE.
|
||||
CapId - The cap ID.
|
||||
Offset - A pointer to the offset.
|
||||
NextRegBlock - A pointer to the next block.
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
**/
|
||||
// TODO: EFI_UNSUPPORTED - add return value to function comment
|
||||
// TODO: EFI_SUCCESS - add return value to function comment
|
||||
// TODO: EFI_NOT_FOUND - add return value to function comment
|
||||
{
|
||||
UINT8 CapabilityPtr;
|
||||
UINT16 CapabilityEntry;
|
||||
@ -196,3 +182,4 @@ Returns:
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user