lkml.org 
[lkml]   [2020]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v3.1 24/27] mmc: core: add post-mmc_attach_sd hook
Date
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@genesyslogic.com.tw>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.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 54e155ff44ff..9e0a5abe9be1 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1411,6 +1411,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 19a265190ad3..03131e4504ad 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -181,6 +181,7 @@ struct mmc_host_ops {
int (*uhs2_set_reg)(struct mmc_host *host, enum uhs2_act act);
void (*uhs2_disable_clk)(struct mmc_host *host);
void (*uhs2_enable_clk)(struct mmc_host *host);
+ void (*uhs2_post_attach_sd)(struct mmc_host *host);
};

struct mmc_cqe_ops {
--
2.28.0
\
 
 \ /
  Last update: 2020-11-06 03:29    [W:0.415 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site