diff options
Diffstat (limited to 'MdeModulePkg/Bus/Ufs/UfsPassThruDxe')
8 files changed, 70 insertions, 70 deletions
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c index 7da21110e3..35ead36567 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c @@ -1,13 +1,13 @@ /** @file
- Copyright (c) 2014, 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
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2014 - 2018, 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
+ http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "UfsPassThru.h"
@@ -32,18 +32,18 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponent GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruDriverNameTable[] = {
- {
+ {
"eng;en",
L"Universal Flash Storage (UFS) Pass Thru Driver"
},
- {
+ {
NULL,
NULL
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruControllerNameTable[] = {
- {
+ {
"eng;en",
L"Universal Flash Storage (UFS) Host Controller"
},
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index e24eb40333..ea329618dc 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -1,6 +1,6 @@ /** @file
- Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2018, 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
@@ -18,7 +18,7 @@ //
UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = {
UFS_PASS_THRU_SIG, // Signature
- NULL, // Handle
+ NULL, // Handle
{ // ExtScsiPassThruMode
0xFFFFFFFF,
EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL | EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL | EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO,
@@ -209,7 +209,7 @@ UfsPassThruPassThru ( if ((Private->Luns.BitMask & (BIT0 << Index)) == 0) {
continue;
}
-
+
if (Private->Luns.Lun[Index] == UfsLun) {
break;
}
@@ -413,7 +413,7 @@ UfsPassThruBuildDevicePath ( if ((Private->Luns.BitMask & (BIT0 << Index)) == 0) {
continue;
}
-
+
if (Private->Luns.Lun[Index] == UfsLun) {
break;
}
@@ -504,7 +504,7 @@ UfsPassThruGetTargetLun ( if ((Private->Luns.BitMask & (BIT0 << Index)) == 0) {
continue;
}
-
+
if (Private->Luns.Lun[Index] == UfsLun) {
break;
}
@@ -730,7 +730,7 @@ UfsPassThruDriverBindingSupported ( This->DriverBindingHandle,
Controller
);
-
+
return EFI_SUCCESS;
}
@@ -883,8 +883,8 @@ UfsPassThruDriverBindingStart ( //
// UFS 2.0 spec Section 13.1.3.3:
- // At the end of the UFS Interconnect Layer initialization on both host and device side,
- // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready.
+ // At the end of the UFS Interconnect Layer initialization on both host and device side,
+ // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready.
//
Status = UfsExecNopCmds (Private);
if (EFI_ERROR (Status)) {
@@ -955,7 +955,7 @@ UfsPassThruDriverBindingStart ( Error:
if (Private != NULL) {
if (Private->TmrlMapping != NULL) {
- UfsHc->Unmap (UfsHc, Private->TmrlMapping);
+ UfsHc->Unmap (UfsHc, Private->TmrlMapping);
}
if (Private->UtpTmrlBase != NULL) {
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (Private->Nutmrs * sizeof (UTP_TMRD)), Private->UtpTmrlBase);
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h index 6c71983258..b8937842b8 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h @@ -1,6 +1,6 @@ /** @file
- Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2018, 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
@@ -35,7 +35,7 @@ #define UFS_PASS_THRU_SIG SIGNATURE_32 ('U', 'F', 'S', 'P')
//
-// Lun 0~7 is for 8 common luns.
+// Lun 0~7 is for 8 common luns.
// Lun 8~11 is for those 4 well known luns (Refer to UFS 2.0 spec Table 10.58 for details):
// Lun 8: REPORT LUNS
// Lun 9: UFS DEVICE
@@ -59,7 +59,7 @@ typedef struct { for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\
Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink)
-typedef struct _UFS_PASS_THRU_PRIVATE_DATA {
+typedef struct _UFS_PASS_THRU_PRIVATE_DATA {
UINT32 Signature;
EFI_HANDLE Handle;
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni index 85c16c1074..1addc23773 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni @@ -1,16 +1,16 @@ // /** @file
-// The UfsPassThruDxe driver is used to provide support on accessing UFS device.
+// The UfsPassThruDxe driver is used to provide support on accessing UFS device.
//
// It produces an EFI_EXT_SCSI_PASS_THRU_PROTOCOL interface for upper layer to send
// SCSI cmd to UFS device.
//
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2015 - 2018, 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
// http://opensource.org/licenses/bsd-license.php
-//
+//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf index 467c533ceb..93b6424020 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf @@ -1,7 +1,7 @@ ## @file
# Description file for the Universal Flash Storage (UFS) Pass Thru driver.
#
-# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 2018, 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
@@ -28,8 +28,8 @@ #
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
-# DRIVER_BINDING = gUfsPassThruDriverBinding
-# COMPONENT_NAME = gUfsPassThruComponentName
+# DRIVER_BINDING = gUfsPassThruDriverBinding
+# COMPONENT_NAME = gUfsPassThruComponentName
#
[Sources]
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni index 4f188f0610..2c8bd01d5d 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni @@ -1,7 +1,7 @@ // /** @file
// UfsPassThruDxe Localized Strings and Content
//
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2015 - 2018, 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
@@ -13,8 +13,8 @@ //
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UFS PassThru UEFI Driver"
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c index 4b7df74501..e868c8c07e 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c @@ -2,7 +2,7 @@ UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU protocol interface
for upper layer application to execute UFS-supported SCSI cmds.
- Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2018, 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
@@ -179,13 +179,13 @@ DumpUicCmdExecResult ( break;
case 0x08:
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n"));
- break;
+ break;
case 0x09:
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BUSY\n"));
break;
case 0x0A:
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - DME_FAILURE\n"));
- break;
+ break;
default :
ASSERT (FALSE);
break;
@@ -196,7 +196,7 @@ DumpUicCmdExecResult ( break;
case 0x01:
DEBUG ((DEBUG_VERBOSE, "UIC control command fails - FAILURE\n"));
- break;
+ break;
default :
ASSERT (FALSE);
break;
@@ -242,7 +242,7 @@ DumpQueryResponseResult ( break;
case 0xFE:
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Opcode\n"));
- break;
+ break;
case 0xFF:
DEBUG ((DEBUG_VERBOSE, "Query Response with General Failure\n"));
break;
@@ -314,7 +314,7 @@ UfsFillTsfOfQueryReqUpiu ( SwapLittleEndianToBigEndian ((UINT8*)&Length, sizeof (Length));
TsfBase->Length = Length;
}
-
+
if (Opcode == UtpQueryFuncOpcodeWrAttr) {
SwapLittleEndianToBigEndian ((UINT8*)&Value, sizeof (Value));
TsfBase->Value = Value;
@@ -790,7 +790,7 @@ EFI_STATUS UfsStartExecCmd (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINT8 Slot
- )
+ )
{
UINT32 Data;
EFI_STATUS Status;
@@ -826,7 +826,7 @@ EFI_STATUS UfsStopExecCmd (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINT8 Slot
- )
+ )
{
UINT32 Data;
EFI_STATUS Status;
@@ -940,7 +940,7 @@ UfsSendDmRequestRetry ( if (EFI_ERROR (Status)) {
return Status;
}
-
+
Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot;
//
// Fill transfer request descriptor to this slot.
@@ -1337,7 +1337,7 @@ UfsExecNopCmds ( //
// Wait for the completion of the transfer request.
- //
+ //
Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, UFS_TIMEOUT);
if (EFI_ERROR (Status)) {
goto Exit;
@@ -1503,7 +1503,7 @@ UfsExecScsiCmds ( //
// Wait for the completion of the transfer request.
- //
+ //
Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << TransReq->Slot, 0, Packet->Timeout);
if (EFI_ERROR (Status)) {
goto Exit;
@@ -1516,7 +1516,7 @@ UfsExecScsiCmds ( ASSERT (Response != NULL);
SenseDataLen = Response->SenseDataLen;
SwapLittleEndianToBigEndian ((UINT8*)&SenseDataLen, sizeof (UINT16));
-
+
if ((Packet->SenseDataLength != 0) && (Packet->SenseData != NULL)) {
CopyMem (Packet->SenseData, Response->SenseData, SenseDataLen);
Packet->SenseDataLength = (UINT8)SenseDataLen;
@@ -1649,7 +1649,7 @@ UfsExecUicCommands ( //
// UFS 2.0 spec section 5.3.1 Offset:0x20 IS.Bit10 UIC Command Completion Status (UCCS)
- // This bit is set to '1' by the host controller upon completion of a UIC command.
+ // This bit is set to '1' by the host controller upon completion of a UIC command.
//
Status = UfsWaitMemSet (Private, UFS_HC_IS_OFFSET, UFS_HC_IS_UCCS, UFS_HC_IS_UCCS, UFS_TIMEOUT);
if (EFI_ERROR (Status)) {
@@ -1907,7 +1907,7 @@ UfsInitTaskManagementRequestList ( EFI_PHYSICAL_ADDRESS CmdDescPhyAddr;
VOID *CmdDescMapping;
EFI_STATUS Status;
-
+
//
// Initial h/w and s/w context for future operations.
//
@@ -1978,7 +1978,7 @@ UfsInitTransferRequestList ( UINT8 Nutrs;
VOID *CmdDescHost;
EFI_PHYSICAL_ADDRESS CmdDescPhyAddr;
- VOID *CmdDescMapping;
+ VOID *CmdDescMapping;
EFI_STATUS Status;
//
@@ -2019,7 +2019,7 @@ UfsInitTransferRequestList ( }
Private->UtpTrlBase = CmdDescHost;
- Private->Nutrs = Nutrs;
+ Private->Nutrs = Nutrs;
Private->TrlMapping = CmdDescMapping;
//
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h index 0a0cf71894..69fae956ce 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h @@ -2,7 +2,7 @@ UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU protocol interface
for upper layer application to execute UFS-supported SCSI cmds.
- Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2018, 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
@@ -153,7 +153,7 @@ typedef struct { // UFSHCI 2.0 Spec Section 5.2.5 Offset 18h: AHIT - Auto-Hibernate Idle Timer
//
typedef struct {
- UINT32 Ahitv:10; // Auto-Hibernate Idle Timer Value
+ UINT32 Ahitv:10; // Auto-Hibernate Idle Timer Value
UINT32 Ts:3; // Timer scale
UINT32 Rsvd1:19;
} UFS_HC_AHIT;
@@ -165,19 +165,19 @@ typedef struct { UINT16 Utrcs:1; // UTP Transfer Request Completion Status
UINT16 Udepri:1; // UIC DME_ENDPOINT_RESET Indication
UINT16 Ue:1; // UIC Error
- UINT16 Utms:1; // UIC Test Mode Status
+ UINT16 Utms:1; // UIC Test Mode Status
- UINT16 Upms:1; // UIC Power Mode Status
- UINT16 Uhxs:1; // UIC Hibernate Exit Status
- UINT16 Uhes:1; // UIC Hibernate Enter Status
- UINT16 Ulls:1; // UIC Link Lost Status
+ UINT16 Upms:1; // UIC Power Mode Status
+ UINT16 Uhxs:1; // UIC Hibernate Exit Status
+ UINT16 Uhes:1; // UIC Hibernate Enter Status
+ UINT16 Ulls:1; // UIC Link Lost Status
- UINT16 Ulss:1; // UIC Link Startup Status
- UINT16 Utmrcs:1; // UTP Task Management Request Completion Status
- UINT16 Uccs:1; // UIC Command Completion Status
- UINT16 Dfes:1; // Device Fatal Error Status
+ UINT16 Ulss:1; // UIC Link Startup Status
+ UINT16 Utmrcs:1; // UTP Task Management Request Completion Status
+ UINT16 Uccs:1; // UIC Command Completion Status
+ UINT16 Dfes:1; // Device Fatal Error Status
- UINT16 Utpes:1; // UTP Error Status
+ UINT16 Utpes:1; // UTP Error Status
UINT16 Rsvd1:3;
UINT16 Hcfes:1; // Host Controller Fatal Error Status
@@ -194,9 +194,9 @@ typedef struct { UINT16 Uee:1; // UIC Error Enable
UINT16 Utmse:1; // UIC Test Mode Status Enable
- UINT16 Upmse:1; // UIC Power Mode Status Enable
+ UINT16 Upmse:1; // UIC Power Mode Status Enable
UINT16 Uhxse:1; // UIC Hibernate Exit Status Enable
- UINT16 Uhese:1; // UIC Hibernate Enter Status Enable
+ UINT16 Uhese:1; // UIC Hibernate Enter Status Enable
UINT16 Ullse:1; // UIC Link Lost Status Enable
UINT16 Ulsse:1; // UIC Link Startup Status Enable
@@ -450,22 +450,22 @@ typedef struct { //
UINT32 Rsvd6:7;
UINT32 UcdBa:25; /* UTP Command Descriptor Base Address */
-
+
//
// DW5
//
UINT32 UcdBaU; /* UTP Command Descriptor Base Address Upper 32-bits */
-
+
//
// DW6
//
- UINT16 RuL; /* Response UPIU Length */
+ UINT16 RuL; /* Response UPIU Length */
UINT16 RuO; /* Response UPIU Offset */
//
// DW7
//
- UINT16 PrdtL; /* PRDT Length */
+ UINT16 PrdtL; /* PRDT Length */
UINT16 PrdtO; /* PRDT Offset */
} UTP_TRD;
@@ -475,12 +475,12 @@ typedef struct { //
UINT32 Rsvd1:2;
UINT32 DbAddr:30; /* Data Base Address */
-
+
//
// DW1
//
UINT32 DbAddrU; /* Data Base Address Upper 32-bits */
-
+
//
// DW2
//
@@ -846,7 +846,7 @@ typedef struct { // DW4 - DW11
//
UTP_TM_REQ_UPIU TmReq; /* Task Management Request UPIU */
-
+
//
// DW12 - DW19
//
@@ -972,7 +972,7 @@ typedef struct { typedef enum {
UfsUtpQueryResponseSuccess = 0x00,
UfsUtpQueryResponseParamNotReadable = 0xF6,
- UfsUtpQueryResponseParamNotWriteable = 0xF7,
+ UfsUtpQueryResponseParamNotWriteable = 0xF7,
UfsUtpQueryResponseParamAlreadyWritten = 0xF8,
UfsUtpQueryResponseInvalidLen = 0xF9,
UfsUtpQueryResponseInvalidVal = 0xFA,
@@ -1305,7 +1305,7 @@ typedef enum { UfsFlagPurgeEn = 0x06,
UfsFlagPhyResRemoval = 0x08,
UfsFlagBusyRtc = 0x09,
- UfsFlagPermDisFwUpdate = 0x0B
+ UfsFlagPermDisFwUpdate = 0x0B
} UFS_FLAGS_IDN;
//
|