Refine some formats and remove some unused prototypes.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
.../DebugCommunicationLibUsb3Common.c | 10 ++---
.../DebugCommunicationLibUsb3Dxe.inf | 6 ++-
.../DebugCommunicationLibUsb3Internal.h | 43 ++--------------------
.../DebugCommunicationLibUsb3Pei.inf | 2 +-
4 files changed, 13 insertions(+), 48 deletions(-)
diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c
index c577df7dea97..e67ff1fe5ca7 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c
@@ -87,8 +87,8 @@ XhcClearR32Bit(
VOID
XhcWriteDebugReg (
IN USB3_DEBUG_PORT_HANDLE *Handle,
- IN UINT32 Offset,
- IN UINT32 Data
+ IN UINT32 Offset,
+ IN UINT32 Data
)
{
EFI_PHYSICAL_ADDRESS DebugCapabilityBase;
@@ -111,7 +111,7 @@ XhcWriteDebugReg (
UINT32
XhcReadDebugReg (
IN USB3_DEBUG_PORT_HANDLE *Handle,
- IN UINT32 Offset
+ IN UINT32 Offset
)
{
UINT32 Data;
@@ -1049,8 +1049,8 @@ DebugPortInitialize (
}
if (Function != NULL) {
- Function (Context, UsbDebugPortHandle);
+ Function (Context, (DEBUG_PORT_HANDLE) UsbDebugPortHandle);
}
- return (DEBUG_PORT_HANDLE)(UINTN)UsbDebugPortHandle;
+ return (DEBUG_PORT_HANDLE) UsbDebugPortHandle;
}
diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.inf b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.inf
index c4e4282c98b4..3af7e7180d37 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.inf
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.inf
@@ -59,8 +59,10 @@ [Pcd]
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|250 ## SOMETIMES_CONSUMES
[Protocols]
- gEfiPciIoProtocolGuid ## CONSUMES
- gEdkiiIoMmuProtocolGuid ## CONSUMES
+ ## NOTIFY
+ ## SOMETIMES_CONSUMES
+ gEfiPciIoProtocolGuid
+ gEdkiiIoMmuProtocolGuid ## SOMETIMES_CONSUMES
[LibraryClasses]
BaseLib
diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Internal.h b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Internal.h
index 66757dafaebe..961786e2a41f 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Internal.h
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Internal.h
@@ -561,7 +561,7 @@ typedef struct _USB3_DEBUG_PORT_INSTANCE {
UINT32
XhcReadDebugReg (
IN USB3_DEBUG_PORT_HANDLE *Handle,
- IN UINT32 Offset
+ IN UINT32 Offset
);
/**
@@ -575,8 +575,8 @@ XhcReadDebugReg (
VOID
XhcSetDebugRegBit (
IN USB3_DEBUG_PORT_HANDLE *Handle,
- IN UINT32 Offset,
- IN UINT32 Bit
+ IN UINT32 Offset,
+ IN UINT32 Bit
);
/**
@@ -595,43 +595,6 @@ XhcWriteDebugReg (
);
/**
- Discover the USB3 debug device.
-
- @param Handle Debug port handle.
-
- @retval RETURN_SUCCESS The serial device was initialized.
- @retval RETURN_DEVICE_ERROR The serial device could not be initialized.
-
-**/
-RETURN_STATUS
-DiscoverUsb3DebugPort(
- USB3_DEBUG_PORT_HANDLE *Handle
- );
-
-/**
- Initialize the Serial Device hardware.
-
- @param Handle Debug port handle.
-
- @retval RETURN_SUCCESS The serial device was initialized successfully.
- @retval !RETURN_SUCCESS Error.
-
-**/
-RETURN_STATUS
-InitializeUsb3DebugPort (
- USB3_DEBUG_PORT_HANDLE *Handle
- );
-
-/**
- Return XHCI MMIO base address.
-
-**/
-EFI_PHYSICAL_ADDRESS
-GetXhciBaseAddress (
- VOID
- );
-
-/**
Verifies if the bit positions specified by a mask are set in a register.
@param[in, out] Register UNITN register
diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.inf b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.inf
index 33074db49a78..4f367622d826 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.inf
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.inf
@@ -41,7 +41,7 @@ [Packages]
[Ppis]
gEfiPeiMemoryDiscoveredPpiGuid ## CONSUMES
- gEdkiiIoMmuPpiGuid ## CONSUMES
+ gEdkiiIoMmuPpiGuid ## SOMETIMES_CONSUMES
[Pcd]
# The memory BAR of ehci host controller, in which usb debug feature is enabled.
--
2.13.3.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2026 Red Hat, Inc.