From: Wolfram Sang Date: Thu, 6 Oct 2022 19:04:49 +0000 (+0200) Subject: mmc: tmio: add callback for dma irq X-Git-Tag: v6.6.7~3927^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af728d7ae20483add9f8d3c81280dc6298a0aa2e;p=platform%2Fkernel%2Flinux-starfive.git 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 Tested-by: Duy Nguyen Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221006190452.5316-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index e36ff80..f3afbed 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 6d50c0d..61f616c 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; }