diff mbox series

[1/2] mmc: host: tmio: Add .sdio_irq()

Message ID 20250610072545.2001435-2-yoshihiro.shimoda.uh@renesas.com
State New
Headers show
Series mmc: host: renesas_sdhi: Fix incorrect auto retuning for an SDIO card | expand

Commit Message

Yoshihiro Shimoda June 10, 2025, 7:25 a.m. UTC
Renesas SDHI controller requires vender specific handling when
an SDIO irq occurs. So, add .sdio_irq() to the tmio core.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/tmio_mmc.h      | 1 +
 drivers/mmc/host/tmio_mmc_core.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Wolfram Sang June 10, 2025, 8:23 a.m. UTC | #1
On Tue, Jun 10, 2025 at 04:25:44PM +0900, Yoshihiro Shimoda wrote:
> Renesas SDHI controller requires vender specific handling when
> an SDIO irq occurs. So, add .sdio_irq() to the tmio core.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
diff mbox series

Patch

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 41787ea77a134..717594a3dc698 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -193,6 +193,7 @@  struct tmio_mmc_host {
 	bool (*check_retune)(struct tmio_mmc_host *host, struct mmc_request *mrq);
 	void (*fixup_request)(struct tmio_mmc_host *host, struct mmc_request *mrq);
 	unsigned int (*get_timeout_cycles)(struct tmio_mmc_host *host);
+	void (*sdio_irq)(struct tmio_mmc_host *host);
 
 	const struct tmio_mmc_dma_ops *dma_ops;
 };
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index b71241f55df57..d16aa0017e8c5 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -696,8 +696,11 @@  static bool __tmio_mmc_sdio_irq(struct tmio_mmc_host *host)
 
 	sd_ctrl_write16(host, CTL_SDIO_STATUS, sdio_status);
 
-	if (mmc->caps & MMC_CAP_SDIO_IRQ && ireg & TMIO_SDIO_STAT_IOIRQ)
+	if (mmc->caps & MMC_CAP_SDIO_IRQ && ireg & TMIO_SDIO_STAT_IOIRQ) {
+		if (host->sdio_irq)
+			host->sdio_irq(host);
 		mmc_signal_sdio_irq(mmc);
+	}
 
 	return ireg;
 }