ufspsxc
Vitis Drivers API Documentation
Overview

Data Structures

struct  XUfsPsxc_Config
 This typedef contains configuration information for the device. More...
 
struct  __attribute__
 Command UPIU Structure. More...
 
struct  XUfsPsxc_UicCmd
 UIC Command Structure. More...
 
struct  XUfsPsxc_BLUNInfo
 BootLU information structure. More...
 
struct  XUfsPsxc
 The XUfsPsxc driver instance data. More...
 

Macros

#define XUFSPSXC_H_
 < prevent circular inclusions More...
 
#define XUFSPSXC_SCSI_GOOD   0x0U
 < UPIU(SCSI) 8-bits [7:0] More...
 
#define XUFSPSXC_LOWLEVEL_H_
 < prevent circular inclusions More...
 

Enumerations

enum  Error_Bits_15_12
 < 4-bits [15:12] More...
 
enum  Error_Bits_11_8
 < 4-bits [11:8] More...
 
enum  Qry_Error_Bits_7_0
 < UPIU(QUERY) 8-bits [7:0] More...
 
enum  Ocs
 < UPIU(OCS) 8-bits [7:0] More...
 
enum  Uic_Cfg_Codes
 < UIC CFG 8-bits [7:0] More...
 
enum  Uic_Ctrl_Codes
 < UIC CTRL 8-bits [7:0] More...
 

Functions

void XUfsPsxc_CfgInitialize (XUfsPsxc *InstancePtr, const XUfsPsxc_Config *ConfigPtr)
 Initializes a specific XUfsPsxc instance such that the driver is ready to use. More...
 
u32 XUfsPsxc_Initialize (XUfsPsxc *InstancePtr)
 Initializes the Host Controller and UFS device. More...
 
u32 XUfsPsxc_ConfigureSpeedGear (XUfsPsxc *InstancePtr, u32 SpeedGear)
 This API Configures the Power Mode. More...
 
u32 XUfsPsxc_CheckBootReq (XUfsPsxc *InstancePtr)
 This API check boot requirements like BootEnable and bBootLunEn. More...
 
u32 XUfsPsxc_SwitchBootLUN (XUfsPsxc *InstancePtr)
 This API switch the Boot-LU(1->2 or 2->1) by modifying the Attributes and also set the block size to 4K if it is not 4K. More...
 
u32 XUfsPsxc_ReadPolled (XUfsPsxc *InstancePtr, u32 Lun, u64 Address, u32 BlkCnt, const u8 *Buff)
 This API perform the data read from the UFS device. More...
 
u32 XUfsPsxc_WritePolled (XUfsPsxc *InstancePtr, u32 Lun, u64 Address, u32 BlkCnt, const u8 *Buff)
 This API perform the data Write to the UFS device. More...
 
XUfsPsxc_ConfigXUfsPsxc_LookupConfig (UINTPTR BaseAddress)
 Looks up the device configuration based on the unique device ID. More...
 
u32 XUfsPsxc_SendUICCmd (const XUfsPsxc *InstancePtr, XUfsPsxc_UicCmd *UicCmdPtr)
 Send UIC Command. More...
 
u32 XUfsPsxc_SetHce (const XUfsPsxc *InstancePtr, u32 Value)
 Perform the Host Controller Enable/Disable. More...
 
void XUfsPsxc_FillNopOutUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API Fill the transfer request descriptor for NOP-OUT UPIU. More...
 
void XUfsPsxc_FillTestUnitRdyUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API Fill the transfer request descriptor for TEST UNIT READY Command. More...
 
void XUfsPsxc_FillReadCmdUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr, u64 Address, u32 BlkCnt, const u8 *Buff)
 This API Fill the transfer request descriptor for READ Command. More...
 
u32 XUfsPsxc_ProcessUpiu (const XUfsPsxc *InstancePtr, const XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API send the UPIU to the UFS device. More...
 
void XUfsPsxc_FillFlagUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr, u32 IsRead, u32 FlagIDn)
 This API Fill the transfer request descriptor for READ/SET FLAG Command. More...
 
void XUfsPsxc_FillDescUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr, u32 Tsf_DW0, u32 IsRead, u32 Length)
 This API Fill the transfer request descriptor for read or write Descriptor Command. More...
 
void XUfsPsxc_FillAttrUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr, u32 IsRead, u32 AttrIDn, u32 Value)
 This API Fill the transfer request descriptor for read or write Attribute Command. More...
 
u32 XUfsPsxc_HostInitialize (XUfsPsxc *InstancePtr)
 Initializes the Host Controller. More...
 
u32 XUfsPsxc_CardInitialize (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API Partially Initialize the UFS device. More...
 
u32 XUfsPsxc_GetLUNInfo (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API update the Logical Unit information structure by reading the configuration descriptor. More...
 
u32 XUfsPsxc_WritePhyReg (const XUfsPsxc *InstancePtr, XUfsPsxc_UicCmd *UicCmdPtr, u32 Address, u32 Value)
 This API does PHY register write with the required sequence. More...
 
u32 XUfsPsxc_ReadPhyReg (const XUfsPsxc *InstancePtr, XUfsPsxc_UicCmd *UicCmdPtr, u32 Address, u32 *Value)
 This API does PHY register read with the required sequence. More...
 
u32 XUfsPsxc_Set4KBlkSize (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API set the block size to 4K for Boot LUN. More...
 
u32 XUfsPsxc_PhyInit (const XUfsPsxc *InstancePtr)
 This API does PHY Initialization sequence. More...
 
u32 XUfsPsxc_SetRmmiConfig (const XUfsPsxc *InstancePtr)
 This API setup RMMI configurations. More...
 
u32 XUfsPsxc_EnableMPhy (const XUfsPsxc *InstancePtr)
 This API enable the MPHY and wait for Rx/Tx busy de-assertion. More...
 
u32 XUfsPsxc_ConfigureTxRxAttributes (const XUfsPsxc *InstancePtr, u32 SpeedGear, u32 RxTermCap, u32 TxTermCap)
 This API Configures the Tx/Rx Attributes. More...
 
u32 XUfsPsxc_ReadDeviceInfo (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr)
 This API read the UFS device information. More...
 
void XUfsPsxc_FillWriteCmdUpiu (XUfsPsxc *InstancePtr, XUfsPsxc_Xfer_CmdDesc *CmdDescPtr, u64 Address, u32 BlkCnt, const u8 *Buff)
 This API Fill the transfer request descriptor for WRITE Command. More...
 

Macro Definition Documentation

#define XUFSPSXC_H_

< prevent circular inclusions

by using protection macros

#define XUFSPSXC_LOWLEVEL_H_

< prevent circular inclusions

by using protection macros

#define XUFSPSXC_SCSI_GOOD   0x0U

< UPIU(SCSI) 8-bits [7:0]

Referenced by XUfsPsxc_ProcessUpiu(), XUfsPsxc_ReadPolled(), and XUfsPsxc_WritePolled().

Enumeration Type Documentation

< 4-bits [11:8]

< 4-bits [15:12]

enum Ocs

< UPIU(OCS) 8-bits [7:0]

< UPIU(QUERY) 8-bits [7:0]

< UIC CFG 8-bits [7:0]

< UIC CTRL 8-bits [7:0]

Function Documentation

u32 XUfsPsxc_CardInitialize ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API Partially Initialize the UFS device.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE.

References XUfsPsxc_FillFlagUpiu(), XUfsPsxc_FillNopOutUpiu(), and XUfsPsxc_ProcessUpiu().

Referenced by XUfsPsxc_Initialize().

void XUfsPsxc_CfgInitialize ( XUfsPsxc InstancePtr,
const XUfsPsxc_Config ConfigPtr 
)

Initializes a specific XUfsPsxc instance such that the driver is ready to use.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
ConfigPtris a reference to a structure containing information about a specific UFSPSXC device. This function initializes an InstancePtr object for a specific device specified by the contents of Config.
Returns
None

References XUfsPsxc_Config::BaseAddress, XUfsPsxc_Config::CfgClkFreqHz, XUfsPsxc_Config::InputClockHz, XUfsPsxc_Config::IsCacheCoherent, and XUfsPsxc_Config::RefPadClk.

Referenced by UfsPsxcRawTest().

u32 XUfsPsxc_CheckBootReq ( XUfsPsxc InstancePtr)

This API check boot requirements like BootEnable and bBootLunEn.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Returns
XUFSPSXC_SUCCESS or ERROR_CODE.

References XUfsPsxc_Set4KBlkSize().

u32 XUfsPsxc_ConfigureSpeedGear ( XUfsPsxc InstancePtr,
u32  SpeedGear 
)

This API Configures the Power Mode.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
SpeedGearis the Power Mode value to be set. Refer XUFSPSXC_PWM_* XUFSPSXC_HS_* macros in xufspsxc.h file.
Returns
XUFSPSXC_SUCCESS or ERROR_CODE.

References XUfsPsxc_ConfigureTxRxAttributes().

u32 XUfsPsxc_ConfigureTxRxAttributes ( const XUfsPsxc InstancePtr,
u32  SpeedGear,
u32  RxTermCap,
u32  TxTermCap 
)

This API Configures the Tx/Rx Attributes.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
SpeedGearis the Power Mode value to be set.
RxTermCapis the Rx Termination Capability.
TxTermCapis the Tx Termination Capability.
Returns
XUFSPSXC_SUCCESS or Error codes.

References XUfsPsxc_SendUICCmd().

Referenced by XUfsPsxc_ConfigureSpeedGear().

u32 XUfsPsxc_EnableMPhy ( const XUfsPsxc InstancePtr)

This API enable the MPHY and wait for Rx/Tx busy de-assertion.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Returns
XUFSPSXC_SUCCESS or Error codes.

References XUfsPsxc_SendUICCmd().

Referenced by XUfsPsxc_PhyInit().

void XUfsPsxc_FillAttrUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr,
u32  IsRead,
u32  AttrIDn,
u32  Value 
)

This API Fill the transfer request descriptor for read or write Attribute Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
IsReadis a flag to indicate whether the operation is read or write descriptor.
AttrIDnis a Attribute Identification number.
Valueis value to be written to the attributes.
Returns
None.

Referenced by XUfsPsxc_GetLUNInfo(), and XUfsPsxc_SwitchBootLUN().

void XUfsPsxc_FillDescUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr,
u32  Tsf_DW0,
u32  IsRead,
u32  Length 
)

This API Fill the transfer request descriptor for read or write Descriptor Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Tsf_DW0contains information about Description identification Number(3rd byte), Index(2nd byte) and Selector(1st byte).
IsReadis a flag to indicate whether the operation is read or write descriptor.
Lengthis the number of bytes to read the descriptor.
Returns
None.

Referenced by XUfsPsxc_GetLUNInfo(), XUfsPsxc_ReadDeviceInfo(), and XUfsPsxc_Set4KBlkSize().

void XUfsPsxc_FillFlagUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr,
u32  IsRead,
u32  FlagIDn 
)

This API Fill the transfer request descriptor for READ/SET FLAG Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
IsReadis a flag to indicate whether the operation is read or write.
FlagIDnis a Flag Identification number.
Returns
None.

Referenced by XUfsPsxc_CardInitialize().

void XUfsPsxc_FillNopOutUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API Fill the transfer request descriptor for NOP-OUT UPIU.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
None.

Referenced by XUfsPsxc_CardInitialize().

void XUfsPsxc_FillReadCmdUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr,
u64  Address,
u32  BlkCnt,
const u8 *  Buff 
)

This API Fill the transfer request descriptor for READ Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Addressspecifies the first logical block accessed by this command.
BlkCntis the number of blocks to be read.
Buffis a pointer to the destination data buffer.
Returns
None.

Referenced by XUfsPsxc_ReadPolled().

void XUfsPsxc_FillTestUnitRdyUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API Fill the transfer request descriptor for TEST UNIT READY Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
None.

Referenced by XUfsPsxc_ReadPolled(), and XUfsPsxc_WritePolled().

void XUfsPsxc_FillWriteCmdUpiu ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr,
u64  Address,
u32  BlkCnt,
const u8 *  Buff 
)

This API Fill the transfer request descriptor for WRITE Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Addressspecifies the first logical block accessed by this command.
BlkCntis the number of blocks to write.
Buffis a pointer to the destination data buffer.
Returns
None.

Referenced by XUfsPsxc_WritePolled().

u32 XUfsPsxc_GetLUNInfo ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API update the Logical Unit information structure by reading the configuration descriptor.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE.

References XUfsPsxc_FillAttrUpiu(), XUfsPsxc_FillDescUpiu(), and XUfsPsxc_ProcessUpiu().

Referenced by XUfsPsxc_Initialize().

u32 XUfsPsxc_HostInitialize ( XUfsPsxc InstancePtr)

Initializes the Host Controller.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE, UIC Error Codes in xufspsxc.h file.

References XUfsPsxc_PhyInit(), XUfsPsxc_SendUICCmd(), and XUfsPsxc_SetHce().

Referenced by XUfsPsxc_Initialize().

u32 XUfsPsxc_Initialize ( XUfsPsxc InstancePtr)

Initializes the Host Controller and UFS device.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE, UIC Error Codes in xufspsxc.h file.

References XUfsPsxc_CardInitialize(), XUfsPsxc_GetLUNInfo(), XUfsPsxc_HostInitialize(), and XUfsPsxc_ReadDeviceInfo().

Referenced by UfsPsxcRawTest().

XUfsPsxc_Config * XUfsPsxc_LookupConfig ( UINTPTR  BaseAddress)

Looks up the device configuration based on the unique device ID.

A table contains the configuration info for each device in the system.

Parameters
BaseAddresscontains the BaseAddress of the device to look up the configuration for.
Returns
A pointer to the configuration found or NULL if the specified device ID was not found. See XUfsPsxc.h for the definition of XUfsPsxc_Config.

References XUfsPsxc_Config::Name.

Referenced by UfsPsxcRawTest().

u32 XUfsPsxc_PhyInit ( const XUfsPsxc InstancePtr)

This API does PHY Initialization sequence.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
UicCmdPtris a pointer to the XUfsPsxc_UicCmd instance.
Returns
XUFSPSXC_SUCCESS or Error codes.

References XUfsPsxc_EnableMPhy(), XUfsPsxc_ReadPhyReg(), XUfsPsxc_SetRmmiConfig(), and XUfsPsxc_WritePhyReg().

Referenced by XUfsPsxc_HostInitialize().

u32 XUfsPsxc_ProcessUpiu ( const XUfsPsxc InstancePtr,
const XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API send the UPIU to the UFS device.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
Refer OCS in xufspsxc.h file, XUFSPSXC_FAILURE

References XUFSPSXC_SCSI_GOOD.

Referenced by XUfsPsxc_CardInitialize(), XUfsPsxc_GetLUNInfo(), XUfsPsxc_ReadDeviceInfo(), XUfsPsxc_ReadPolled(), XUfsPsxc_Set4KBlkSize(), XUfsPsxc_SwitchBootLUN(), and XUfsPsxc_WritePolled().

u32 XUfsPsxc_ReadDeviceInfo ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API read the UFS device information.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE.

References XUfsPsxc_FillDescUpiu(), and XUfsPsxc_ProcessUpiu().

Referenced by XUfsPsxc_Initialize().

u32 XUfsPsxc_ReadPhyReg ( const XUfsPsxc InstancePtr,
XUfsPsxc_UicCmd UicCmdPtr,
u32  Address,
u32 *  Value 
)

This API does PHY register read with the required sequence.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
UicCmdPtris a pointer to the XUfsPsxc_UicCmd instance.
Addressis Address of the PHy register.
Valueis a pointer to store the PHY register data.
Returns
XUFSPSXC_SUCCESS or Error codes.

References XUfsPsxc_SendUICCmd().

Referenced by XUfsPsxc_PhyInit().

u32 XUfsPsxc_ReadPolled ( XUfsPsxc InstancePtr,
u32  Lun,
u64  Address,
u32  BlkCnt,
const u8 *  Buff 
)

This API perform the data read from the UFS device.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Lunis a Logical Unit Number.
Addressis the starting Logical Unit number.
BlkCntis the number of blocks to be read.
Buffis a pointer to the destination data buffer.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE.

References XUfsPsxc_FillReadCmdUpiu(), XUfsPsxc_FillTestUnitRdyUpiu(), XUfsPsxc_ProcessUpiu(), and XUFSPSXC_SCSI_GOOD.

Referenced by UfsPsxcRawTest().

u32 XUfsPsxc_SendUICCmd ( const XUfsPsxc InstancePtr,
XUfsPsxc_UicCmd UicCmdPtr 
)

Send UIC Command.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
UicCmdPtris a pointer to the XUfsPsxc_UicCmd instance.
Returns
Refer UIC Error Codes in xufspsxc.h file.

Referenced by XUfsPsxc_ConfigureTxRxAttributes(), XUfsPsxc_EnableMPhy(), XUfsPsxc_HostInitialize(), XUfsPsxc_ReadPhyReg(), XUfsPsxc_SetRmmiConfig(), and XUfsPsxc_WritePhyReg().

u32 XUfsPsxc_Set4KBlkSize ( XUfsPsxc InstancePtr,
XUfsPsxc_Xfer_CmdDesc *  CmdDescPtr 
)

This API set the block size to 4K for Boot LUN.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
CmdDescPtris a pointer to the XUfsPsxc_Xfer_CmdDesc instance.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE.

References XUfsPsxc_FillDescUpiu(), and XUfsPsxc_ProcessUpiu().

Referenced by XUfsPsxc_CheckBootReq(), and XUfsPsxc_SwitchBootLUN().

u32 XUfsPsxc_SetHce ( const XUfsPsxc InstancePtr,
u32  Value 
)

Perform the Host Controller Enable/Disable.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Valueis used to enable/disable Host Controller.
Returns
XUFSPSXC_SUCCESS for Success XUFSPSXC_FAILURE for failure

Referenced by XUfsPsxc_HostInitialize().

u32 XUfsPsxc_SetRmmiConfig ( const XUfsPsxc InstancePtr)

This API setup RMMI configurations.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Returns
XUFSPSXC_SUCCESS or Error codes.

References XUfsPsxc_SendUICCmd().

Referenced by XUfsPsxc_PhyInit().

u32 XUfsPsxc_SwitchBootLUN ( XUfsPsxc InstancePtr)

This API switch the Boot-LU(1->2 or 2->1) by modifying the Attributes and also set the block size to 4K if it is not 4K.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Returns
XUFSPSXC_SUCCESS or ERROR_CODE.

References XUfsPsxc_FillAttrUpiu(), XUfsPsxc_ProcessUpiu(), and XUfsPsxc_Set4KBlkSize().

Referenced by UfsPsxcRawTest().

u32 XUfsPsxc_WritePhyReg ( const XUfsPsxc InstancePtr,
XUfsPsxc_UicCmd UicCmdPtr,
u32  Address,
u32  Value 
)

This API does PHY register write with the required sequence.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
UicCmdPtris a pointer to the XUfsPsxc_UicCmd instance.
Addressis Address of the PHy register.
Valueis Value to be written to the PHY register.
Returns
XUFSPSXC_SUCCESS or Error codes.

References XUfsPsxc_SendUICCmd().

Referenced by XUfsPsxc_PhyInit().

u32 XUfsPsxc_WritePolled ( XUfsPsxc InstancePtr,
u32  Lun,
u64  Address,
u32  BlkCnt,
const u8 *  Buff 
)

This API perform the data Write to the UFS device.

Parameters
InstancePtris a pointer to the XUfsPsxc instance.
Lunis a Logical Unit Number.
Addressis the starting Logical Unit number.
BlkCntis the number of blocks to be read.
Buffis a pointer to the destination data buffer.
Returns
XUFSPSXC_SUCCESS, XUFSPSXC_FAILURE.

References XUfsPsxc_FillTestUnitRdyUpiu(), XUfsPsxc_FillWriteCmdUpiu(), XUfsPsxc_ProcessUpiu(), and XUFSPSXC_SCSI_GOOD.

Referenced by UfsPsxcRawTest().