| sdps Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

- Data Structures
- Data Fields

Public Member Functions | Data Fields
XSdPs Struct Reference
SDPS APIs

The XSdPs driver instance data. More...

## Public Member Functions
XSdPs_Adma2Descriptor32 Adma2_DescrTbl32[32] | __attribute__ ((aligned(32)))
| ADMA descriptor table 32 Bit. More...
XSdPs_Adma2Descriptor64 Adma2_DescrTbl64[32] | __attribute__ ((aligned(32)))
| ADMA descriptor table 64 Bit. More...

## Data Fields
XSdPs_Config | Config
| Configuration structure. More...
u32 | IsReady
| Device is initialized and ready. More...
u32 | Host_Caps
| Capabilities of host controller. More...
u32 | Host_CapsExt
| Extended Capabilities. More...
u32 | HCS
| High capacity support in card. More...
u8 | CardType
| Type of card - SD/MMC/eMMC. More...
u8 | Card_Version
| Card version. More...
u8 | HC_Version
| Host controller version. More...
u8 | BusWidth
| Current operating bus width. More...
u32 | BusSpeed
| Current operating bus speed. More...
u8 | Switch1v8
| 1.8V Switch support More...
u32 | CardID [4]
| Card ID Register. More...
u32 | RelCardAddr
| Relative Card Address. More...
u32 | CardSpecData [4]
| Card Specific Data Register. More...
u32 | SectorCount
| Sector Count. More...
u32 | SdCardConfig
| Sd Card Configuration Register. More...
u32 | Mode
| Bus Speed Mode. More...
u32 | OTapDelay
| Output Tap Delay. More...
u32 | ITapDelay
| Input Tap Delay. More...
u64 | Dma64BitAddr
| 64 Bit DMA Address More...
u16 | TransferMode
| Transfer Mode. More...
u32 | SlcrBaseAddr
| SLCR base address. More...
u8 | IsBusy
| Busy Flag. More...
u32 | BlkSize
| Block Size. More...
u8 | IsTuningDone
| Flag to indicate HS200 tuning complete. More...

## Detailed Description

The XSdPs driver instance data.

The user is required to allocate a variable of this type for every SD device in the system. A pointer to a variable of this type is then passed to the driver API functions.

## Member Function Documentation

XSdPs_Adma2Descriptor32 Adma2_DescrTbl32 [32] XSdPs::__attribute__ | ( | (aligned(32)) |  | ) |

ADMA descriptor table 32 Bit.

XSdPs_Adma2Descriptor64 Adma2_DescrTbl64 [32] XSdPs::__attribute__ | ( | (aligned(32)) |  | ) |

ADMA descriptor table 64 Bit.

## Field Documentation

u32 XSdPs::BlkSize

Block Size.

Referenced by XSdPs_CfgInitialize(), XSdPs_MmcCardInitialize(), XSdPs_Read(), XSdPs_ReadPolled(), XSdPs_SetBlkSize(), and XSdPs_Write().

u32 XSdPs::BusSpeed

Current operating bus speed.

Referenced by XSdPs_CalcBusSpeed(), XSdPs_CardInitialize(), XSdPs_Change_BusSpeed(), XSdPs_MmcCardEnum(), and XSdPs_SdCardEnum().

u8 XSdPs::BusWidth

Current operating bus width.

Referenced by XSdPs_AutoTuning(), XSdPs_CardInitialize(), XSdPs_Change_BusWidth(), XSdPs_EmmcModeInit(), XSdPs_IdentifyEmmcMode(), XSdPs_MmcModeInit(), and XSdPs_SdModeInit().

u8 XSdPs::Card_Version

Card version.

Referenced by XSdPs_CardIfCond(), XSdPs_GetCsd(), and XSdPs_MmcCardInitialize().

u32 XSdPs::CardID[4]

Card ID Register.

Referenced by XSdPs_GetCardId().

u32 XSdPs::CardSpecData[4]

Card Specific Data Register.

Referenced by XSdPs_Erase(), and XSdPs_GetCsd().

u8 XSdPs::CardType

Type of card - SD/MMC/eMMC.

Referenced by XSdPs_AutoTuning(), XSdPs_CalcBusSpeed(), XSdPs_CardInitialize(), XSdPs_CardOpCond(), XSdPs_Change_BusSpeed(), XSdPs_Change_BusWidth(), XSdPs_Change_ClkFreq(), XSdPs_FrameCmd(), XSdPs_GetCardId(), XSdPs_GetCsd(), XSdPs_IdentifyCard(), XSdPs_MmcCardInitialize(), XSdPs_SetClock(), XSdPs_SetEndAddr(), and XSdPs_SetStartAddr().

XSdPs_Config XSdPs::Config

Configuration structure.

Referenced by XSdPs_AutoTuning(), XSdPs_CalcClock(), XSdPs_CardIfCond(), XSdPs_CardInitialize(), XSdPs_CardOpCond(), XSdPs_CardSetVoltage18(), XSdPs_CfgInitialize(), XSdPs_Change_BusSpeed(), XSdPs_Change_BusWidth(), XSdPs_Change_ClkFreq(), XSdPs_Change_SdBusSpeed(), XSdPs_CheckBusHigh(), XSdPs_CheckBusIdle(), XSdPs_CheckCardDetect(), XSdPs_CheckResetDone(), XSdPs_CheckTransferComplete(), XSdps_CheckTransferDone(), XSdPs_CheckVoltage18(), XSdPs_CmdTransfer(), XSdPs_ConfigDma(), XSdPs_ConfigInterrupt(), XSdPs_ConfigPower(), XSdPs_ConfigTapDelay(), XSdPs_DisableBusPower(), XSdPs_DllReset(), XSdPs_DllRstCtrl(), XSdPs_EmmcModeInit(), XSdPs_EnableBusPower(), XSdPs_EnableClock(), XSdPs_Erase(), XSdPs_Get_BusSpeed(), XSdPs_Get_BusWidth(), XSdPs_Get_Mmc_ExtCsd(), XSdPs_Get_Status(), XSdPs_GetCardId(), XSdPs_GetCsd(), XSdPs_HostConfig(), XSdPs_Identify_UhsMode(), XSdPs_IdentifyCard(), XSdPs_IdentifyEmmcMode(), XSdPs_Idle(), XSdPs_MmcCardInitialize(), XSdPs_ReadPolled(), XSdPs_Reset(), XSdPs_ResetConfig(), XSdPs_Sanitize(), XSdPs_SdCardInitialize(), XSdPs_SdModeInit(), XSdPs_SendCmd(), XSdPs_SetBlkSize(), XSdPs_SetClock(), XSdPs_SetExecTuning(), XSdPs_SetTapDelay_DDR50(), XSdPs_SetTapDelay_SDR104(), XSdPs_SetTapDelay_SDR25(), XSdPs_SetTapDelay_SDR50(), XSdPs_Setup32ADMA2DescTbl(), XSdPs_Setup64ADMA2DescTbl(), XSdPs_SetupADMA2DescTbl64Bit(), XSdPs_SetupCmd(), XSdPs_SetupReadDma(), XSdPs_SetupTransfer(), XSdPs_SetupVoltageSwitch(), XSdPs_SetupWriteDma(), XSdPs_SetVoltage18(), and XSdPs_WritePolled().

u64 XSdPs::Dma64BitAddr

64 Bit DMA Address

Referenced by XSdPs_CfgInitialize(), XSdPs_SetupADMA2DescTbl64Bit(), XSdPs_SetupReadDma(), and XSdPs_SetupWriteDma().

u8 XSdPs::HC_Version

Host controller version.

Referenced by XSdPs_CalcClock(), XSdPs_CardOpCond(), XSdPs_CfgInitialize(), XSdPs_Change_BusWidth(), XSdPs_Change_ClkFreq(), XSdPs_CheckCardDetect(), XSdPs_ConfigDma(), XSdPs_DisableBusPower(), XSdPs_EmmcModeInit(), XSdPs_EnableBusPower(), XSdPs_Erase(), XSdPs_IdentifyCard(), XSdPs_MmcCardInitialize(), XSdPs_SdCardEnum(), XSdPs_SetupADMA2DescTbl(), and XSdPs_SetupTransfer().

u32 XSdPs::HCS

High capacity support in card.

Referenced by XSdPs_CardOpCond().

u32 XSdPs::Host_Caps

Capabilities of host controller.

Referenced by XSdPs_CfgInitialize(), XSdPs_CheckCardDetect(), XSdPs_ConfigPower(), XSdPs_Erase(), XSdPs_IdentifyCard(), XSdPs_ResetConfig(), and XSdPs_SetupTransfer().

u32 XSdPs::Host_CapsExt

Extended Capabilities.

u8 XSdPs::IsBusy

Busy Flag.

Referenced by XSdPs_CfgInitialize(), XSdPs_CheckTransferComplete(), XSdPs_Erase(), XSdPs_ReadPolled(), XSdPs_Sanitize(), XSdPs_StartReadTransfer(), XSdPs_StartWriteTransfer(), and XSdPs_WritePolled().

u32 XSdPs::IsReady

Device is initialized and ready.

Referenced by XSdPs_CardInitialize(), XSdPs_CfgInitialize(), XSdPs_Change_BusSpeed(), XSdPs_Change_BusWidth(), XSdPs_Change_ClkFreq(), XSdPs_CheckReadTransfer(), XSdPs_CheckWriteTransfer(), XSdPs_Erase(), XSdPs_Get_BusSpeed(), XSdPs_Get_BusWidth(), XSdPs_Get_Mmc_ExtCsd(), XSdPs_Get_Status(), XSdPs_Idle(), XSdPs_Pullup(), XSdPs_ReadPolled(), XSdPs_Sanitize(), XSdPs_Select_Card(), XSdPs_Set_Mmc_ExtCsd(), XSdPs_SetBlkSize(), XSdPs_StartReadTransfer(), XSdPs_StartWriteTransfer(), and XSdPs_WritePolled().

u8 XSdPs::IsTuningDone

Flag to indicate HS200 tuning complete.

Referenced by XSdPs_CalcBusSpeed(), XSdPs_CfgInitialize(), XSdPs_Change_BusSpeed(), and XSdPs_IdentifyEmmcMode().

u32 XSdPs::ITapDelay

Input Tap Delay.

Referenced by XSdPs_CfgInitialize(), XSdPs_Change_ClkFreq(), XSdPs_ConfigTapDelay(), XSdPs_IdentifyEmmcMode(), XSdPs_SdModeInit(), XSdPs_SetTapDelay_DDR50(), and XSdPs_SetTapDelay_SDR25().

u32 XSdPs::Mode

Bus Speed Mode.

Referenced by XSdPs_CalcBusSpeed(), XSdPs_CfgInitialize(), XSdPs_Change_BusSpeed(), XSdPs_Change_BusWidth(), XSdPs_Change_ClkFreq(), XSdPs_Change_SdBusSpeed(), XSdPs_CheckEmmcTiming(), XSdPs_EmmcModeInit(), XSdPs_Identify_UhsMode(), XSdPs_IdentifyEmmcMode(), XSdPs_MmcCardInitialize(), XSdPs_MmcModeInit(), XSdPs_SdModeInit(), XSdPs_SetClock(), and XSdPs_SetTapDelay().

u32 XSdPs::OTapDelay

Output Tap Delay.

Referenced by XSdPs_CfgInitialize(), XSdPs_Change_ClkFreq(), XSdPs_ConfigTapDelay(), XSdPs_IdentifyEmmcMode(), XSdPs_SdModeInit(), XSdPs_SetTapDelay_DDR50(), XSdPs_SetTapDelay_SDR104(), XSdPs_SetTapDelay_SDR25(), and XSdPs_SetTapDelay_SDR50().

u32 XSdPs::RelCardAddr

Relative Card Address.

Referenced by XSdPs_Change_BusWidth(), XSdPs_Get_BusWidth(), XSdPs_Get_Status(), XSdPs_GetCardId(), XSdPs_GetCsd(), XSdPs_Pullup(), and XSdPs_Select_Card().

u32 XSdPs::SdCardConfig

Sd Card Configuration Register.

u32 XSdPs::SectorCount

Sector Count.

Referenced by XSdPs_CfgInitialize(), XSdPs_EmmcModeInit(), XSdPs_GetCsd(), and XSdPs_MmcModeInit().

u32 XSdPs::SlcrBaseAddr

SLCR base address.

Referenced by XSdPs_CfgInitialize(), XSdPs_ConfigTapDelay(), and XSdPs_DllRstCtrl().

u8 XSdPs::Switch1v8

1.8V Switch support

Referenced by XSdPs_CardInitialize(), XSdPs_CardOpCond(), XSdPs_Change_SdBusSpeed(), and XSdPs_SdModeInit().

u16 XSdPs::TransferMode

Transfer Mode.

Referenced by XSdPs_AutoTuning(), XSdPs_Erase(), XSdPs_HostConfig(), XSdPs_SendCmd(), XSdPs_SetupReadDma(), and XSdPs_SetupWriteDma().