summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-10-06 21:04:49 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2022-12-07 13:22:36 +0100
commitaf728d7ae20483add9f8d3c81280dc6298a0aa2e (patch)
tree450fb11ca6b00d1d2e9f22684cdd80b0e2d3891f /drivers/mmc
parent7f3ea248cd1b2ea9b49f6f3523250bc8e622dd5e (diff)
downloadlinux-af728d7ae20483add9f8d3c81280dc6298a0aa2e.tar.bz2
mmc: tmio: add callback for dma irq
We don't want to rely only on the access_end irq in the future, so implement a callback for dma irqs. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Duy Nguyen <duy.nguyen.rh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20221006190452.5316-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc.h1
-rw-r--r--drivers/mmc/host/tmio_mmc_core.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index e36ff80108e6..f3afbed7d340 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -128,6 +128,7 @@ struct tmio_mmc_dma_ops {
/* optional */
void (*end)(struct tmio_mmc_host *host); /* held host->lock */
+ bool (*dma_irq)(struct tmio_mmc_host *host);
};
struct tmio_mmc_host {
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 6d50c0dd53fe..61f616c5b190 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -668,6 +668,9 @@ static bool __tmio_mmc_sdcard_irq(struct tmio_mmc_host *host, int ireg,
return true;
}
+ if (host->dma_ops && host->dma_ops->dma_irq && host->dma_ops->dma_irq(host))
+ return true;
+
return false;
}