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) ...@@ -219,26 +219,18 @@ static void rsi_reset_card(struct sdio_func *pfunction)
if (err) if (err)
rsi_dbg(ERR_ZONE, "%s: CMD0 failed : %d\n", __func__, err); rsi_dbg(ERR_ZONE, "%s: CMD0 failed : %d\n", __func__, err);
if (!host->ocr_avail) { /* Issue CMD5, arg = 0 */
/* Issue CMD5, arg = 0 */ err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND, 0,
err = rsi_issue_sdiocommand(pfunction, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
SD_IO_SEND_OP_COND, if (err)
0, rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", __func__, err);
(MMC_RSP_R4 | MMC_CMD_BCR), card->ocr = resp;
&resp);
if (err)
rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n",
__func__, err);
host->ocr_avail = resp;
}
/* Issue CMD5, arg = ocr. Wait till card is ready */ /* Issue CMD5, arg = ocr. Wait till card is ready */
for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) {
err = rsi_issue_sdiocommand(pfunction, err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND,
SD_IO_SEND_OP_COND, card->ocr,
host->ocr_avail, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
(MMC_RSP_R4 | MMC_CMD_BCR),
&resp);
if (err) { if (err) {
rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n",
__func__, err); __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