summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mmci.h
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2023-06-20 12:11:13 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2023-06-22 12:06:37 +0300
commitb1a665932dc23cad0b8af2745cd9713f9e930d63 (patch)
treea4a75fe3768360097ab1d304137fcdf737c00633 /drivers/mmc/host/mmci.h
parentc467c8f081859d4f4ca4eee4fba54bb5d85d6c97 (diff)
downloadlinux-b1a665932dc23cad0b8af2745cd9713f9e930d63.tar.xz
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.h')
-rw-r--r--drivers/mmc/host/mmci.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
index 361954249d04..253197f132fc 100644
--- a/drivers/mmc/host/mmci.h
+++ b/drivers/mmc/host/mmci.h
@@ -397,7 +397,7 @@ struct mmci_host_ops {
void (*dma_error)(struct mmci_host *host);
void (*set_clkreg)(struct mmci_host *host, unsigned int desired);
void (*set_pwrreg)(struct mmci_host *host, unsigned int pwr);
- bool (*busy_complete)(struct mmci_host *host, u32 status, u32 err_msk);
+ bool (*busy_complete)(struct mmci_host *host, struct mmc_command *cmd, u32 status, u32 err_msk);
void (*pre_sig_volt_switch)(struct mmci_host *host);
int (*post_sig_volt_switch)(struct mmci_host *host, struct mmc_ios *ios);
};
@@ -455,6 +455,7 @@ struct mmci_host {
void *dma_priv;
s32 next_cookie;
+ struct delayed_work ux500_busy_timeout_work;
};
#define dma_inprogress(host) ((host)->dma_in_progress)