summaryrefslogtreecommitdiff
path: root/drivers/mmc/octeontx_hsmmc.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2022-09-02 14:10:46 +0200
committerStefan Roese <sr@denx.de>2022-09-18 10:26:33 +0200
commit29caf9305b6fafe8f6d6b18fa1f825dff8686e61 (patch)
tree6530f6a2373b7af6fb4fdceca823b21f7c79ed7f /drivers/mmc/octeontx_hsmmc.c
parent881d4108257a45ac890ef27c523783dbe401e462 (diff)
cyclic: Use schedule() instead of WATCHDOG_RESET()
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
Diffstat (limited to 'drivers/mmc/octeontx_hsmmc.c')
-rw-r--r--drivers/mmc/octeontx_hsmmc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c
index 6e9acf7310..4ee62df9d4 100644
--- a/drivers/mmc/octeontx_hsmmc.c
+++ b/drivers/mmc/octeontx_hsmmc.c
@@ -1023,7 +1023,7 @@ static void octeontx_mmc_cleanup_dma(struct mmc *mmc,
start = get_timer(0);
do {
rsp_sts.u = read_csr(mmc, MIO_EMM_RSP_STS());
- WATCHDOG_RESET();
+ schedule();
} while (get_timer(start) < 100 &&
(rsp_sts.s.dma_val || rsp_sts.s.dma_pend));
} while (retries-- >= 0 && rsp_sts.s.dma_pend);
@@ -1107,7 +1107,7 @@ static int octeontx_mmc_wait_dma(struct mmc *mmc, bool write, ulong timeout,
} else if (!rsp_sts.s.dma_val && emm_dma_int.s.done) {
break;
}
- WATCHDOG_RESET();
+ schedule();
timed_out = (get_timer(start_time) > timeout);
} while (!timed_out);
@@ -1219,7 +1219,7 @@ static int octeontx_mmc_read_blocks(struct mmc *mmc, struct mmc_cmd *cmd,
}
return blkcnt - count;
}
- WATCHDOG_RESET();
+ schedule();
} while (--count);
}
#ifdef DEBUG
@@ -1253,7 +1253,7 @@ static int octeontx_mmc_poll_ready(struct mmc *mmc, ulong timeout)
} else if (cmd.response[0] & R1_READY_FOR_DATA) {
return 0;
}
- WATCHDOG_RESET();
+ schedule();
} while (get_timer(start) < timeout);
if (not_ready)
@@ -1328,7 +1328,7 @@ static ulong octeontx_mmc_write_blocks(struct mmc *mmc, struct mmc_cmd *cmd,
read_csr(mmc, MIO_EMM_DMA()));
return blkcnt - count;
}
- WATCHDOG_RESET();
+ schedule();
} while (--count);
}
@@ -1491,7 +1491,7 @@ static int octeontx_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
start = get_timer(0);
do {
rsp_sts.u = read_csr(mmc, MIO_EMM_RSP_STS());
- WATCHDOG_RESET();
+ schedule();
} while (!rsp_sts.s.cmd_done && !rsp_sts.s.rsp_timeout &&
(get_timer(start) < timeout + 10));
octeontx_mmc_print_rsp_errors(mmc, rsp_sts);