summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshenglei <shenglei.zhang@intel.com>2018-08-08 13:53:35 +0800
committerStar Zeng <star.zeng@intel.com>2018-08-21 16:28:59 +0800
commit2ed6c872f30a57cd25b34617e60cf6d2c75669b7 (patch)
tree7104e624736c93e9895f2a21fef312d13c5ba7b3
parenta829f08684e29ebb68009ff2bcbf9f8edaf4affa (diff)
downloadedk2-2ed6c872f30a57cd25b34617e60cf6d2c75669b7.zip
edk2-2ed6c872f30a57cd25b34617e60cf6d2c75669b7.tar.gz
edk2-2ed6c872f30a57cd25b34617e60cf6d2c75669b7.tar.bz2
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 <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c66
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.h28
2 files changed, 0 insertions, 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.