From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>, Ruiyu Ni <ruiyu.ni@intel.com>,
Hao Wu <hao.a.wu@intel.com>
Subject: [PATCH 1/3] SourceLevelDebugPkg DebugCommUsb3: Refine some formats
Date: Sun, 11 Mar 2018 23:16:17 +0800 [thread overview]
Message-ID: <20180311151619.1260-2-star.zeng@intel.com> (raw)
In-Reply-To: <20180311151619.1260-1-star.zeng@intel.com>
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
next prev parent reply other threads:[~2018-03-11 15:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 15:16 [PATCH 0/3] SouceLevelDebugPkg DebugCommUsb3: Enhancements after supporting IOMMU Star Zeng
2018-03-11 15:16 ` Star Zeng [this message]
2018-03-11 15:16 ` [PATCH 2/3] SourceLevelDebugPkg DebugCommUsb3: Realloc granted DXE DMA buffer Star Zeng
2018-03-11 15:16 ` [PATCH 3/3] SourceLevelDebugPkg DebugCommUsb3: Use the Handle from DebugAgentLib Star Zeng
2018-03-12 2:09 ` [PATCH 0/3] SouceLevelDebugPkg DebugCommUsb3: Enhancements after supporting IOMMU Wu, Hao A
2018-03-12 2:28 ` Zeng, Star
2018-03-12 3:37 ` Zeng, Star
2018-03-13 12:56 ` Wu, Hao A
2018-03-13 12:58 ` Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180311151619.1260-2-star.zeng@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox