From 2ed6c872f30a57cd25b34617e60cf6d2c75669b7 Mon Sep 17 00:00:00 2001 From: shenglei Date: Wed, 8 Aug 2018 13:53:35 +0800 Subject: MdeModulePkg XhciDxe: Remove redundant functions The functions that are never called have been removed. They are XhcReadDoorBellReg and XhcWriteOpReg16. 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: Laszlo Ersek Reviewed-by: Star Zeng --- MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c | 66 ---------------------------------- MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h | 28 --------------- 2 files changed, 94 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c index 4d5937d..5f0736a 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c @@ -158,75 +158,9 @@ XhcWriteOpReg ( } } -/** - Write the data to the 2-bytes width XHCI operational register. - @param Xhc The XHCI Instance. - @param Offset The offset of the 2-bytes width operational register. - @param Data The data to write. -**/ -VOID -XhcWriteOpReg16 ( - IN USB_XHCI_INSTANCE *Xhc, - IN UINT32 Offset, - IN UINT16 Data - ) -{ - EFI_STATUS Status; - - ASSERT (Xhc->CapLength != 0); - - Status = Xhc->PciIo->Mem.Write ( - Xhc->PciIo, - EfiPciIoWidthUint16, - XHC_BAR_INDEX, - Xhc->CapLength + Offset, - 1, - &Data - ); - - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "XhcWriteOpReg16: Pci Io Write error: %r at %d\n", Status, Offset)); - } -} - -/** - Read XHCI door bell register. - - @param Xhc The XHCI Instance. - @param Offset The offset of the door bell register. - @return The register content read - -**/ -UINT32 -XhcReadDoorBellReg ( - IN USB_XHCI_INSTANCE *Xhc, - IN UINT32 Offset - ) -{ - UINT32 Data; - EFI_STATUS Status; - - ASSERT (Xhc->DBOff != 0); - - Status = Xhc->PciIo->Mem.Read ( - Xhc->PciIo, - EfiPciIoWidthUint32, - XHC_BAR_INDEX, - Xhc->DBOff + Offset, - 1, - &Data - ); - - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "XhcReadDoorBellReg: Pci Io Read error - %r at %d\n", Status, Offset)); - Data = 0xFFFFFFFF; - } - - return Data; -} /** Write the data to the XHCI door bell register. diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h index 838a446..20e7ac0 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h @@ -286,20 +286,6 @@ XhcWriteOpReg ( IN UINT32 Data ); -/** - Write the data to the 2-bytes width XHCI operational register. - - @param Xhc The XHCI Instance. - @param Offset The offset of the 2-bytes width operational register. - @param Data The data to write. - -**/ -VOID -XhcWriteOpReg16 ( - IN USB_XHCI_INSTANCE *Xhc, - IN UINT32 Offset, - IN UINT16 Data - ); /** Read XHCI runtime register. @@ -331,20 +317,6 @@ XhcWriteRuntimeReg ( IN UINT32 Data ); -/** - Read XHCI door bell register. - - @param Xhc The XHCI Instance. - @param Offset The offset of the door bell register. - - @return The register content read - -**/ -UINT32 -XhcReadDoorBellReg ( - IN USB_XHCI_INSTANCE *Xhc, - IN UINT32 Offset - ); /** Write the data to the XHCI door bell register. -- cgit v1.1