Commit f95bbd97 authored by Karun Eagalapati's avatar Karun Eagalapati Committed by Kalle Valo

rsi: fix sdio card reset problem

card reset is not working with recent kernels. Using
host->card->ocr instead of host->ocr_avail solved the problem.
Signed-off-by: default avatarKarun Eagalapati <karun256@gmail.com>
Signed-off-by: default avatarAmitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 09cfb41f
......@@ -219,26 +219,18 @@ static void rsi_reset_card(struct sdio_func *pfunction)
if (err)
rsi_dbg(ERR_ZONE, "%s: CMD0 failed : %d\n", __func__, err);
if (!host->ocr_avail) {
/* Issue CMD5, arg = 0 */
err = rsi_issue_sdiocommand(pfunction,
SD_IO_SEND_OP_COND,
0,
(MMC_RSP_R4 | MMC_CMD_BCR),
&resp);
if (err)
rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n",
__func__, err);
host->ocr_avail = resp;
}
/* Issue CMD5, arg = 0 */
err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND, 0,
(MMC_RSP_R4 | MMC_CMD_BCR), &resp);
if (err)
rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", __func__, err);
card->ocr = resp;
/* Issue CMD5, arg = ocr. Wait till card is ready */
for (i = 0; i < 100; i++) {
err = rsi_issue_sdiocommand(pfunction,
SD_IO_SEND_OP_COND,
host->ocr_avail,
(MMC_RSP_R4 | MMC_CMD_BCR),
&resp);
err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND,
card->ocr,
(MMC_RSP_R4 | MMC_CMD_BCR), &resp);
if (err) {
rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n",
__func__, err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment