/* This function checks for Reset Done bits to be cleared after a reset assert.  */
s32 XSdPs_CheckResetDone(XSdPs *InstancePtr, u8 Value)
/* This function checks for Reset Done bits to be cleared after a reset assert.  */
s32 XSdPs_CheckResetDone(XSdPs *InstancePtr, u8 Value)
{
    u32 Timeout = 1000000U;
    u32 ReadReg;
    s32 Status;
    do {
        ReadReg = XSdPs_ReadReg8(InstancePtr->Config.BaseAddress,
                XSDPS_SW_RST_OFFSET);
        Timeout = Timeout - 1U;
        usleep(1);
    } while (((ReadReg & Value) != 0U)
            && (Timeout != 0U));
    if (Timeout == 0U) {
        Status = XST_FAILURE;
        goto RETURN_PATH ;
    }
    Status = XST_SUCCESS;
RETURN_PATH:
    return Status;
}