mmc: tmio: add callback for dma irq
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 6 Oct 2022 19:04:49 +0000 (21:04 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 7 Dec 2022 12:22:36 +0000 (13:22 +0100)
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>
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_core.c

index e36ff80..f3afbed 100644 (file)
@@ -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 {
index 6d50c0d..61f616c 100644 (file)
@@ -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;
 }