From aa79b0b3799e95bc21e0df32a135cc5a4d749e4b Mon Sep 17 00:00:00 2001 From: jji4 Date: Wed, 3 Dec 2008 08:52:39 +0000 Subject: Global variables have been moved backward ahead of functions. Only a few cases were left due to its module structure. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6816 6f19259b-4bc3-4df7-8a09-765794883524 --- .../PcatSingleSegmentPciCfg2Pei/PciCfg2.c | 44 +++++++++++----------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei') diff --git a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c index 722c800378..0d899c9260 100644 --- a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c +++ b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c @@ -23,27 +23,6 @@ #include -/** - Convert EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS to PCI_LIB_ADDRESS. - - @param Address PCI address with - EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS format. - - @return The PCI address with PCI_LIB_ADDRESS format. - -**/ -UINTN -PciCfgAddressConvert ( - EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *Address - ) -{ - if (Address->ExtendedRegister == 0) { - return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->Register); - } - - return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->ExtendedRegister); -} - /** Reads from a given location in the PCI configuration space. @@ -184,6 +163,29 @@ EFI_PEI_PPI_DESCRIPTOR gPciCfg2PpiList = { &gPciCfg2Ppi }; + +/** + Convert EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS to PCI_LIB_ADDRESS. + + @param Address PCI address with + EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS format. + + @return The PCI address with PCI_LIB_ADDRESS format. + +**/ +UINTN +PciCfgAddressConvert ( + EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *Address + ) +{ + if (Address->ExtendedRegister == 0) { + return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->Register); + } + + return PCI_LIB_ADDRESS (Address->Bus, Address->Device, Address->Function, Address->ExtendedRegister); +} + + /** Reads from a given location in the PCI configuration space. -- cgit v1.2.3