MdeModulePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
7c7184e201
commit
1436aea4d5
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "UfsPassThruHci.h"
|
||||
|
||||
#define UFS_PASS_THRU_SIG SIGNATURE_32 ('U', 'F', 'S', 'P')
|
||||
#define UFS_PASS_THRU_SIG SIGNATURE_32 ('U', 'F', 'S', 'P')
|
||||
|
||||
//
|
||||
// Lun 0~7 is for 8 common luns.
|
||||
@@ -38,46 +38,46 @@
|
||||
// Lun 10: BOOT
|
||||
// Lun 11: RPMB
|
||||
//
|
||||
#define UFS_MAX_LUNS 12
|
||||
#define UFS_WLUN_PREFIX 0xC1
|
||||
#define UFS_INIT_COMPLETION_TIMEOUT 600000
|
||||
#define UFS_MAX_LUNS 12
|
||||
#define UFS_WLUN_PREFIX 0xC1
|
||||
#define UFS_INIT_COMPLETION_TIMEOUT 600000
|
||||
|
||||
typedef struct {
|
||||
UINT8 Lun[UFS_MAX_LUNS];
|
||||
UINT16 BitMask:12; // Bit 0~7 is 1/1 mapping to common luns. Bit 8~11 is 1/1 mapping to well-known luns.
|
||||
UINT16 Rsvd:4;
|
||||
UINT8 Lun[UFS_MAX_LUNS];
|
||||
UINT16 BitMask : 12; // Bit 0~7 is 1/1 mapping to common luns. Bit 8~11 is 1/1 mapping to well-known luns.
|
||||
UINT16 Rsvd : 4;
|
||||
} UFS_EXPOSED_LUNS;
|
||||
|
||||
typedef struct _UFS_PASS_THRU_PRIVATE_DATA {
|
||||
UINT32 Signature;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
|
||||
EFI_EXT_SCSI_PASS_THRU_PROTOCOL ExtScsiPassThru;
|
||||
EFI_UFS_DEVICE_CONFIG_PROTOCOL UfsDevConfig;
|
||||
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHostController;
|
||||
UINTN UfsHcBase;
|
||||
EDKII_UFS_HC_INFO UfsHcInfo;
|
||||
EDKII_UFS_HC_DRIVER_INTERFACE UfsHcDriverInterface;
|
||||
UINT32 Signature;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
|
||||
EFI_EXT_SCSI_PASS_THRU_PROTOCOL ExtScsiPassThru;
|
||||
EFI_UFS_DEVICE_CONFIG_PROTOCOL UfsDevConfig;
|
||||
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHostController;
|
||||
UINTN UfsHcBase;
|
||||
EDKII_UFS_HC_INFO UfsHcInfo;
|
||||
EDKII_UFS_HC_DRIVER_INTERFACE UfsHcDriverInterface;
|
||||
|
||||
UINT8 TaskTag;
|
||||
UINT8 TaskTag;
|
||||
|
||||
VOID *UtpTrlBase;
|
||||
UINT8 Nutrs;
|
||||
VOID *TrlMapping;
|
||||
VOID *UtpTmrlBase;
|
||||
UINT8 Nutmrs;
|
||||
VOID *TmrlMapping;
|
||||
VOID *UtpTrlBase;
|
||||
UINT8 Nutrs;
|
||||
VOID *TrlMapping;
|
||||
VOID *UtpTmrlBase;
|
||||
UINT8 Nutmrs;
|
||||
VOID *TmrlMapping;
|
||||
|
||||
UFS_EXPOSED_LUNS Luns;
|
||||
UFS_EXPOSED_LUNS Luns;
|
||||
|
||||
//
|
||||
// For Non-blocking operation.
|
||||
//
|
||||
EFI_EVENT TimerEvent;
|
||||
LIST_ENTRY Queue;
|
||||
EFI_EVENT TimerEvent;
|
||||
LIST_ENTRY Queue;
|
||||
} UFS_PASS_THRU_PRIVATE_DATA;
|
||||
|
||||
#define UFS_PASS_THRU_TRANS_REQ_SIG SIGNATURE_32 ('U', 'F', 'S', 'T')
|
||||
#define UFS_PASS_THRU_TRANS_REQ_SIG SIGNATURE_32 ('U', 'F', 'S', 'T')
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
@@ -100,12 +100,12 @@ typedef struct {
|
||||
#define UFS_PASS_THRU_TRANS_REQ_FROM_THIS(a) \
|
||||
CR(a, UFS_PASS_THRU_TRANS_REQ, TransferList, UFS_PASS_THRU_TRANS_REQ_SIG)
|
||||
|
||||
#define UFS_TIMEOUT EFI_TIMER_PERIOD_SECONDS(3)
|
||||
#define UFS_HC_ASYNC_TIMER EFI_TIMER_PERIOD_MILLISECONDS(1)
|
||||
#define UFS_TIMEOUT EFI_TIMER_PERIOD_SECONDS(3)
|
||||
#define UFS_HC_ASYNC_TIMER EFI_TIMER_PERIOD_MILLISECONDS(1)
|
||||
|
||||
#define ROUNDUP8(x) (((x) % 8 == 0) ? (x) : ((x) / 8 + 1) * 8)
|
||||
#define ROUNDUP8(x) (((x) % 8 == 0) ? (x) : ((x) / 8 + 1) * 8)
|
||||
|
||||
#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) == 0)
|
||||
#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) == 0)
|
||||
|
||||
#define UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS(a) \
|
||||
CR (a, \
|
||||
@@ -129,19 +129,20 @@ typedef struct {
|
||||
)
|
||||
|
||||
typedef struct _UFS_DEVICE_MANAGEMENT_REQUEST_PACKET {
|
||||
UINT64 Timeout;
|
||||
VOID *DataBuffer;
|
||||
UINT8 Opcode;
|
||||
UINT8 DescId;
|
||||
UINT8 Index;
|
||||
UINT8 Selector;
|
||||
UINT32 TransferLength;
|
||||
UINT8 DataDirection;
|
||||
UINT64 Timeout;
|
||||
VOID *DataBuffer;
|
||||
UINT8 Opcode;
|
||||
UINT8 DescId;
|
||||
UINT8 Index;
|
||||
UINT8 Selector;
|
||||
UINT32 TransferLength;
|
||||
UINT8 DataDirection;
|
||||
} UFS_DEVICE_MANAGEMENT_REQUEST_PACKET;
|
||||
|
||||
//
|
||||
// function prototype
|
||||
//
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
@@ -264,15 +265,16 @@ UfsPassThruDriverBindingStart (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
//
|
||||
// EFI Component Name Functions
|
||||
//
|
||||
|
||||
/**
|
||||
Retrieves a Unicode string that is the user readable name of the driver.
|
||||
|
||||
@@ -320,7 +322,6 @@ UfsPassThruComponentNameGetDriverName (
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by a driver.
|
||||
@@ -392,11 +393,11 @@ UfsPassThruComponentNameGetDriverName (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -443,11 +444,11 @@ UfsPassThruComponentNameGetControllerName (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruPassThru (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN UINT8 *Target,
|
||||
IN UINT64 Lun,
|
||||
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
|
||||
IN EFI_EVENT Event OPTIONAL
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN UINT8 *Target,
|
||||
IN UINT64 Lun,
|
||||
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
|
||||
IN EFI_EVENT Event OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -479,9 +480,9 @@ UfsPassThruPassThru (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruGetNextTargetLun (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN OUT UINT8 **Target,
|
||||
IN OUT UINT64 *Lun
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN OUT UINT8 **Target,
|
||||
IN OUT UINT64 *Lun
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -514,10 +515,10 @@ UfsPassThruGetNextTargetLun (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruBuildDevicePath (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN UINT8 *Target,
|
||||
IN UINT64 Lun,
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN UINT8 *Target,
|
||||
IN UINT64 Lun,
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -542,10 +543,10 @@ UfsPassThruBuildDevicePath (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruGetTargetLun (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
OUT UINT8 **Target,
|
||||
OUT UINT64 *Lun
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
OUT UINT8 **Target,
|
||||
OUT UINT64 *Lun
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -562,7 +563,7 @@ UfsPassThruGetTargetLun (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruResetChannel (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -587,9 +588,9 @@ UfsPassThruResetChannel (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruResetTargetLun (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN UINT8 *Target,
|
||||
IN UINT64 Lun
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN UINT8 *Target,
|
||||
IN UINT64 Lun
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -617,8 +618,8 @@ UfsPassThruResetTargetLun (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsPassThruGetNextTarget (
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN OUT UINT8 **Target
|
||||
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
|
||||
IN OUT UINT8 **Target
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -664,7 +665,7 @@ UfsExecScsiCmds (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsControllerInit (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -678,7 +679,7 @@ UfsControllerInit (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsControllerStop (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -697,11 +698,11 @@ UfsControllerStop (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsAllocateAlignCommonBuffer (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UINTN Size,
|
||||
OUT VOID **CmdDescHost,
|
||||
OUT EFI_PHYSICAL_ADDRESS *CmdDescPhyAddr,
|
||||
OUT VOID **CmdDescMapping
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UINTN Size,
|
||||
OUT VOID **CmdDescHost,
|
||||
OUT EFI_PHYSICAL_ADDRESS *CmdDescPhyAddr,
|
||||
OUT VOID **CmdDescMapping
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -717,8 +718,8 @@ UfsAllocateAlignCommonBuffer (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsSetFlag (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UINT8 FlagId
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UINT8 FlagId
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -735,9 +736,9 @@ UfsSetFlag (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsReadFlag (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UINT8 FlagId,
|
||||
OUT UINT8 *Value
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UINT8 FlagId,
|
||||
OUT UINT8 *Value
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -755,10 +756,10 @@ UfsReadFlag (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsRwFlags (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 FlagId,
|
||||
IN OUT UINT8 *Value
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 FlagId,
|
||||
IN OUT UINT8 *Value
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -781,13 +782,13 @@ UfsRwFlags (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsRwDeviceDesc (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 DescId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT VOID *Descriptor,
|
||||
IN OUT UINT32 *DescSize
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 DescId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT VOID *Descriptor,
|
||||
IN OUT UINT32 *DescSize
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -807,12 +808,12 @@ UfsRwDeviceDesc (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsRwAttributes (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 AttrId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT UINT32 *Attributes
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 AttrId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT UINT32 *Attributes
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -830,7 +831,7 @@ UfsRwAttributes (
|
||||
**/
|
||||
EFI_STATUS
|
||||
UfsExecNopCmds (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -843,8 +844,8 @@ UfsExecNopCmds (
|
||||
VOID
|
||||
EFIAPI
|
||||
ProcessAsyncTaskList (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -860,8 +861,8 @@ ProcessAsyncTaskList (
|
||||
VOID
|
||||
EFIAPI
|
||||
SignalCallerEvent (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UFS_PASS_THRU_TRANS_REQ *TransReq
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||
IN UFS_PASS_THRU_TRANS_REQ *TransReq
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -890,13 +891,13 @@ SignalCallerEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsRwUfsDescriptor (
|
||||
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 DescId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT UINT8 *Descriptor,
|
||||
IN OUT UINT32 *DescSize
|
||||
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 DescId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT UINT8 *Descriptor,
|
||||
IN OUT UINT32 *DescSize
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -920,10 +921,10 @@ UfsRwUfsDescriptor (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsRwUfsFlag (
|
||||
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 FlagId,
|
||||
IN OUT UINT8 *Flag
|
||||
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 FlagId,
|
||||
IN OUT UINT8 *Flag
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -952,13 +953,13 @@ UfsRwUfsFlag (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UfsRwUfsAttribute (
|
||||
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 AttrId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT UINT8 *Attribute,
|
||||
IN OUT UINT32 *AttrSize
|
||||
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
|
||||
IN BOOLEAN Read,
|
||||
IN UINT8 AttrId,
|
||||
IN UINT8 Index,
|
||||
IN UINT8 Selector,
|
||||
IN OUT UINT8 *Attribute,
|
||||
IN OUT UINT32 *AttrSize
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -991,9 +992,9 @@ GetUfsHcInfo (
|
||||
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gUfsPassThruComponentName;
|
||||
extern EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponentName2;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gUfsPassThruComponentName;
|
||||
extern EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponentName2;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding;
|
||||
extern EDKII_UFS_HC_PLATFORM_PROTOCOL *mUfsHcPlatform;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user