summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c')
-rw-r--r--SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c
index d7829c2110..d996f80f59 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c
@@ -1,7 +1,7 @@
/** @file
Debug Port Library implementation based on usb debug port.
- Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -559,7 +559,7 @@ NeedReinitializeHardware(
//
// If the owner and in_use bit is not set, it means system is doing cold/warm boot or EHCI host controller is reset by system software.
//
- UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)(UINTN)(Handle->UsbDebugPortMemoryBase + Handle->DebugPortOffset);
+ UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)((UINTN)Handle->UsbDebugPortMemoryBase + Handle->DebugPortOffset);
if ((MmioRead32((UINTN)&UsbDebugPortRegister->ControlStatus) & (USB_DEBUG_PORT_OWNER | USB_DEBUG_PORT_ENABLE | USB_DEBUG_PORT_IN_USE))
!= (USB_DEBUG_PORT_OWNER | USB_DEBUG_PORT_ENABLE | USB_DEBUG_PORT_IN_USE)) {
Status = TRUE;
@@ -604,10 +604,10 @@ InitializeUsbDebugHardware (
UINT8 DebugPortNumber;
UINT8 Length;
- UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)(UINTN)(Handle->UsbDebugPortMemoryBase + Handle->DebugPortOffset);
- UsbHCSParam = (UINT32 *)(UINTN)(Handle->EhciMemoryBase + 0x04);
- UsbCmd = (UINT32 *)(UINTN)(Handle->EhciMemoryBase + 0x20);
- UsbStatus = (UINT32 *)(UINTN)(Handle->EhciMemoryBase + 0x24);
+ UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)((UINTN)Handle->UsbDebugPortMemoryBase + Handle->DebugPortOffset);
+ UsbHCSParam = (UINT32 *)((UINTN)Handle->EhciMemoryBase + 0x04);
+ UsbCmd = (UINT32 *)((UINTN)Handle->EhciMemoryBase + 0x20);
+ UsbStatus = (UINT32 *)((UINTN)Handle->EhciMemoryBase + 0x24);
//
// Check if the debug port is enabled and owned by myself.
@@ -652,7 +652,7 @@ InitializeUsbDebugHardware (
//
// Should find a device is connected at debug port
//
- PortStatus = (UINT32 *)(UINTN)(Handle->EhciMemoryBase + 0x64 + (DebugPortNumber - 1) * 4);
+ PortStatus = (UINT32 *)((UINTN)Handle->EhciMemoryBase + 0x64 + (DebugPortNumber - 1) * 4);
if (!(MmioRead32((UINTN)PortStatus) & BIT0)) {
Handle->Initialized = USBDBG_NO_DEV;
return RETURN_NOT_FOUND;
@@ -870,7 +870,7 @@ DebugPortWriteBuffer (
}
}
- UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)(UINTN)(UsbDebugPortHandle->UsbDebugPortMemoryBase + UsbDebugPortHandle->DebugPortOffset);
+ UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)((UINTN)UsbDebugPortHandle->UsbDebugPortMemoryBase + UsbDebugPortHandle->DebugPortOffset);
while ((Total < NumberOfBytes)) {
if (NumberOfBytes - Total > USB_DEBUG_PORT_MAX_PACKET_SIZE) {
@@ -950,7 +950,7 @@ DebugPortPollBuffer (
return TRUE;
}
- UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)(UINTN)(UsbDebugPortHandle->UsbDebugPortMemoryBase + UsbDebugPortHandle->DebugPortOffset);
+ UsbDebugPortRegister = (USB_DEBUG_PORT_REGISTER *)((UINTN)UsbDebugPortHandle->UsbDebugPortMemoryBase + UsbDebugPortHandle->DebugPortOffset);
UsbDebugPortRegister->TokenPid = INPUT_PID;
if (UsbDebugPortHandle->BulkInToggle == 0) {