[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221014114601.15594-24-victor.shih@genesyslogic.com.tw>
Date: Fri, 14 Oct 2022 19:45:58 +0800
From: Victor Shih <victorshihgli@...il.com>
To: ulf.hansson@...aro.org, adrian.hunter@...el.com
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
benchuanggli@...il.com, HL.Liu@...esyslogic.com.tw,
Greg.tu@...esyslogic.com.tw, takahiro.akashi@...aro.org,
dlunev@...omium.org, Victor Shih <victor.shih@...esyslogic.com.tw>,
Ben Chuang <ben.chuang@...esyslogic.com.tw>
Subject: [PATCH V5 23/26] mmc: core: add post-mmc_attach_sd hook
From: AKASHI Takahiro <takahiro.akashi@...aro.org>
This "post" hook for mmc_attach_sd() will be required to enable UHS-II
support, at least, on GL9755.
Signed-off-by: Ben Chuang <ben.chuang@...esyslogic.com.tw>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@...aro.org>
---
drivers/mmc/core/sd.c | 6 ++++++
include/linux/mmc/host.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index cab4725209c1..975987fb02a1 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1855,6 +1855,12 @@ int mmc_attach_sd(struct mmc_host *host)
goto remove_card;
mmc_claim_host(host);
+
+ /* TODO: Is this the right place? */
+ if ((host->flags & MMC_UHS2_INITIALIZED) &&
+ host->ops->uhs2_post_attach_sd)
+ host->ops->uhs2_post_attach_sd(host);
+
return 0;
remove_card:
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index cf5adf26b6e4..e58be4ccb308 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -279,6 +279,7 @@ struct mmc_host_ops {
int (*uhs2_set_reg)(struct mmc_host *host, enum sd_uhs2_operation act);
int (*uhs2_disable_clk)(struct mmc_host *host);
int (*uhs2_enable_clk)(struct mmc_host *host);
+ void (*uhs2_post_attach_sd)(struct mmc_host *host);
/*
* The uhs2_control callback is used to execute SD UHS-II specific
--
2.25.1
Powered by blists - more mailing lists