X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FUfs%2FUfsPassThruDxe%2FUfsPassThru.h;h=bdc64f779309039f9c451cf94c4e0ea1649bfbbc;hb=95ad8f7f6a6c84ef46a96a8ba852afed805d1ca3;hp=7fc82bae7a3e0783ca083cc2f4e4b49a7b688d84;hpb=ed356b9e80d46c40457dd90f5352835e6611200b;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h index 7fc82bae7a..bdc64f7793 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
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 @@ -122,16 +122,13 @@ typedef struct { typedef struct _UFS_DEVICE_MANAGEMENT_REQUEST_PACKET { UINT64 Timeout; - VOID *InDataBuffer; - VOID *OutDataBuffer; + VOID *DataBuffer; UINT8 Opcode; UINT8 DescId; UINT8 Index; UINT8 Selector; - UINT32 InTransferLength; - UINT32 OutTransferLength; + UINT32 TransferLength; UINT8 DataDirection; - UINT8 Ocs; } UFS_DEVICE_MANAGEMENT_REQUEST_PACKET; // @@ -716,6 +713,25 @@ UfsSetFlag ( IN UINT8 FlagId ); +/** + Read specified flag from a UFS device. + + @param[in] Private The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure. + @param[in] FlagId The ID of flag to be read. + @param[out] Value The flag's value. + + @retval EFI_SUCCESS The flag was read successfully. + @retval EFI_DEVICE_ERROR A device error occurred while attempting to read the flag. + @retval EFI_TIMEOUT A timeout occurred while waiting for the completion of reading the flag. + +**/ +EFI_STATUS +UfsReadFlag ( + IN UFS_PASS_THRU_PRIVATE_DATA *Private, + IN UINT8 FlagId, + OUT UINT8 *Value + ); + /** Read or write specified device descriptor of a UFS device. @@ -743,6 +759,31 @@ UfsRwDeviceDesc ( IN UINT32 DescSize ); +/** + Read or write specified attribute of a UFS device. + + @param[in] Private The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure. + @param[in] Read The boolean variable to show r/w direction. + @param[in] AttrId The ID of Attribute. + @param[in] Index The Index of Attribute. + @param[in] Selector The Selector of Attribute. + @param[in, out] Attributes The value of Attribute to be read or written. + + @retval EFI_SUCCESS The Attribute was read/written successfully. + @retval EFI_DEVICE_ERROR A device error occurred while attempting to r/w the Attribute. + @retval EFI_TIMEOUT A timeout occurred while waiting for the completion of r/w the Attribute. + +**/ +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 + ); + /** Sends NOP IN cmd to a UFS device for initialization process request. For more details, please refer to UFS 2.0 spec Figure 13.3.