From 349b08d6ad2f42cdb3cd57f62c49edc2da284ee9 Mon Sep 17 00:00:00 2001 From: shenglei Date: Wed, 8 Aug 2018 13:55:06 +0800 Subject: [PATCH] MdeModulePkg XhciPei: Remove redundant functions The functions that are never called have been removed. They are XhcPeiReadDoorBellReg and UsbHcUnlinkMemBlock. https://bugzilla.tianocore.org/show_bug.cgi?id=1062 Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei Reviewed-by: Ruiyu Ni Reviewed-by: Star Zeng --- MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c | 24 ------------------------ MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c | 22 ---------------------- MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h | 14 -------------- 3 files changed, 60 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c b/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c index 5d0232ca56..442a613095 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c +++ b/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c @@ -328,31 +328,7 @@ UsbHcIsMemBlockEmpty ( return TRUE; } -/** - Unlink the memory block from the pool's list. - - @param Head The block list head of the memory's pool. - @param BlockToUnlink The memory block to unlink. -**/ -VOID -UsbHcUnlinkMemBlock ( - IN USBHC_MEM_BLOCK *Head, - IN USBHC_MEM_BLOCK *BlockToUnlink - ) -{ - USBHC_MEM_BLOCK *Block; - - ASSERT ((Head != NULL) && (BlockToUnlink != NULL)); - - for (Block = Head; Block != NULL; Block = Block->Next) { - if (Block->Next == BlockToUnlink) { - Block->Next = BlockToUnlink->Next; - BlockToUnlink->Next = NULL; - break; - } - } -} /** Initialize the memory management pool for the host controller. diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c index c5631e87ca..ee4d1f97bd 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c @@ -211,29 +211,7 @@ XhcPeiReadCapRegister ( return Data; } -/** - Read XHCI door bell register. - - @param Xhc The XHCI device. - @param Offset The offset of the door bell register. - - @return The register content read -**/ -UINT32 -XhcPeiReadDoorBellReg ( - IN PEI_XHC_DEV *Xhc, - IN UINT32 Offset - ) -{ - UINT32 Data; - - ASSERT (Xhc->DBOff != 0); - - Data = MmioRead32 (Xhc->UsbHostControllerBaseAddress + Xhc->DBOff + Offset); - - return Data; -} /** Write the data to the XHCI door bell register. diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h b/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h index 0297072ffd..3787aeccf5 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciReg.h @@ -302,20 +302,6 @@ XhcPeiWaitOpRegBit ( IN UINT32 Timeout ); -/** - Read XHCI door bell register. - - @param Xhc The XHCI device. - @param Offset The offset of the door bell register. - - @return The register content read - -**/ -UINT32 -XhcPeiReadDoorBellReg ( - IN PEI_XHC_DEV *Xhc, - IN UINT32 Offset - ); /** Write the data to the XHCI door bell register. -- 2.39.2