diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2023-06-20 11:11:13 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-06-22 11:06:37 +0200 |
commit | b1a665932dc23cad0b8af2745cd9713f9e930d63 (patch) | |
tree | a4a75fe3768360097ab1d304137fcdf737c00633 /drivers/mmc/host/mmci_stm32_sdmmc.c | |
parent | c467c8f081859d4f4ca4eee4fba54bb5d85d6c97 (diff) |
mmc: mmci: Add support for SW busy-end timeouts
The ux500 variant doesn't have a HW based timeout to use for busy-end IRQs.
To avoid hanging and waiting for the card to stop signaling busy, let's
schedule a delayed work, according to the corresponding cmd->busy_timeout
for the command. If the work gets to run, let's kick the IRQ handler to
complete the currently running request/command.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230620091113.33393-1-ulf.hansson@linaro.org
Diffstat (limited to 'drivers/mmc/host/mmci_stm32_sdmmc.c')
-rw-r--r-- | drivers/mmc/host/mmci_stm32_sdmmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci_stm32_sdmmc.c b/drivers/mmc/host/mmci_stm32_sdmmc.c index 5f9541080e57..35067e1e6cd8 100644 --- a/drivers/mmc/host/mmci_stm32_sdmmc.c +++ b/drivers/mmc/host/mmci_stm32_sdmmc.c @@ -411,7 +411,8 @@ static u32 sdmmc_get_dctrl_cfg(struct mmci_host *host) return datactrl; } -static bool sdmmc_busy_complete(struct mmci_host *host, u32 status, u32 err_msk) +static bool sdmmc_busy_complete(struct mmci_host *host, struct mmc_command *cmd, + u32 status, u32 err_msk) { void __iomem *base = host->base; u32 busy_d0, busy_d0end, mask, sdmmc_status; |