sdps: Polled for Transfer Complete bit after cmd6.
Polled for Transfer Complete bit after sending CMD6 in case of eMMC card. since CMD6 expects a R1b response we need to check for Transfer complete before sending next command. Signed-off-by: P L Sai Krishna <lakshmis@xilinx.com> Reviewed-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
This commit is contained in:
parent
5155c4f47f
commit
f0dfbbd126
2 changed files with 19 additions and 1 deletions
|
@ -36,7 +36,7 @@ BEGIN driver sdps
|
|||
OPTION supported_peripherals = (ps7_sdio psu_sd);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 2.5;
|
||||
OPTION VERSION = 2.6;
|
||||
OPTION NAME = sdps;
|
||||
|
||||
END driver
|
||||
|
|
|
@ -293,6 +293,24 @@ s32 XSdPs_Change_BusWidth(XSdPs *InstancePtr)
|
|||
Status = XST_FAILURE;
|
||||
goto RETURN_PATH;
|
||||
}
|
||||
|
||||
/* Check for transfer complete */
|
||||
do {
|
||||
StatusReg = XSdPs_ReadReg16(InstancePtr->Config.BaseAddress,
|
||||
XSDPS_NORM_INTR_STS_OFFSET);
|
||||
if ((StatusReg & XSDPS_INTR_ERR_MASK) != 0U) {
|
||||
/* Write to clear error bits */
|
||||
XSdPs_WriteReg16(InstancePtr->Config.BaseAddress,
|
||||
XSDPS_ERR_INTR_STS_OFFSET,
|
||||
XSDPS_ERROR_INTR_ALL_MASK);
|
||||
Status = XST_FAILURE;
|
||||
goto RETURN_PATH;
|
||||
}
|
||||
} while((StatusReg & XSDPS_INTR_TC_MASK) == 0U);
|
||||
|
||||
/* Write to clear bit */
|
||||
XSdPs_WriteReg16(InstancePtr->Config.BaseAddress,
|
||||
XSDPS_NORM_INTR_STS_OFFSET, XSDPS_INTR_TC_MASK);
|
||||
}
|
||||
|
||||
#if defined (__arm__) || defined (__aarch64__)
|
||||
|
|
Loading…
Add table
Reference in a new issue