/* This function is used to check the eMMC timing.  */
s32 XSdPs_CheckEmmcTiming(XSdPs *InstancePtr, u8 *ExtCsd)
/* This function is used to check the eMMC timing.  */
s32 XSdPs_CheckEmmcTiming(XSdPs *InstancePtr, u8 *ExtCsd)
{
    s32 Status;
    Status = XSdPs_Get_Mmc_ExtCsd(InstancePtr, ExtCsd);
    if (Status != XST_SUCCESS) {
        Status = XST_FAILURE;
        goto RETURN_PATH;
    }
    if (InstancePtr->Mode == XSDPS_HS200_MODE) {
        if (ExtCsd[EXT_CSD_HS_TIMING_BYTE] != EXT_CSD_HS_TIMING_HS200) {
            Status = XST_FAILURE;
            goto RETURN_PATH;
        }
    } else if ((InstancePtr->Mode == XSDPS_HIGH_SPEED_MODE) ||
            (InstancePtr->Mode == XSDPS_DDR52_MODE)) {
        if (ExtCsd[EXT_CSD_HS_TIMING_BYTE] != EXT_CSD_HS_TIMING_HIGH) {
            Status = XST_FAILURE;
            goto RETURN_PATH;
        }
    } else {
        Status = XST_FAILURE;
    }
RETURN_PATH:
    return Status;
}