[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190607223716.119277-5-dianders@chromium.org>
Date: Fri, 7 Jun 2019 15:37:15 -0700
From: Douglas Anderson <dianders@...omium.org>
To: Ulf Hansson <ulf.hansson@...aro.org>,
Kalle Valo <kvalo@...eaurora.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Arend van Spriel <arend.vanspriel@...adcom.com>
Cc: brcm80211-dev-list.pdl@...adcom.com,
linux-rockchip@...ts.infradead.org,
Double Lo <double.lo@...ress.com>, briannorris@...omium.org,
linux-wireless@...r.kernel.org,
Naveen Gupta <naveen.gupta@...ress.com>,
Madhan Mohan R <madhanmohan.r@...ress.com>, mka@...omium.org,
Wright Feng <wright.feng@...ress.com>,
Chi-Hsien Lin <chi-hsien.lin@...ress.com>,
netdev@...r.kernel.org, brcm80211-dev-list@...ress.com,
Douglas Anderson <dianders@...omium.org>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Pan Bian <bianpan2016@....com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
Tony Lindgren <tony@...mide.com>,
Mathieu Malaterre <malat@...ian.org>,
Pavel Machek <pavel@....cz>
Subject: [PATCH v3 4/5] mmc: core: Export mmc_retune_hold_now() mmc_retune_release()
We want SDIO drivers to be able to temporarily stop retuning when the
driver knows that the SDIO card is not in a state where retuning will
work (maybe because the card is asleep). We'll move the relevant
functions to a place where drivers can call them.
NOTE: We'll leave the calls with a mmc_ prefix following the lead of
the API call mmc_hw_reset(), which is also expected to be called
directly by SDIO cards.
Signed-off-by: Douglas Anderson <dianders@...omium.org>
---
Changes in v3:
- ("mmc: core: Export mmc_retune_hold_now() mmc_retune_release()") new for v3.
Changes in v2: None
drivers/mmc/core/host.c | 7 +++++++
drivers/mmc/core/host.h | 7 -------
include/linux/mmc/core.h | 2 ++
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 6a51f7a06ce7..361f4d151d20 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -111,6 +111,13 @@ void mmc_retune_hold(struct mmc_host *host)
host->hold_retune += 1;
}
+void mmc_retune_hold_now(struct mmc_host *host)
+{
+ host->retune_now = 0;
+ host->hold_retune += 1;
+}
+EXPORT_SYMBOL(mmc_retune_hold_now);
+
void mmc_retune_release(struct mmc_host *host)
{
if (host->hold_retune)
diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h
index 4805438c02ff..3212afc6c9fe 100644
--- a/drivers/mmc/core/host.h
+++ b/drivers/mmc/core/host.h
@@ -19,17 +19,10 @@ void mmc_unregister_host_class(void);
void mmc_retune_enable(struct mmc_host *host);
void mmc_retune_disable(struct mmc_host *host);
void mmc_retune_hold(struct mmc_host *host);
-void mmc_retune_release(struct mmc_host *host);
int mmc_retune(struct mmc_host *host);
void mmc_retune_pause(struct mmc_host *host);
void mmc_retune_unpause(struct mmc_host *host);
-static inline void mmc_retune_hold_now(struct mmc_host *host)
-{
- host->retune_now = 0;
- host->hold_retune += 1;
-}
-
static inline void mmc_retune_recheck(struct mmc_host *host)
{
if (host->hold_retune <= 1)
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 02a13abf0cda..53085245383c 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -181,5 +181,7 @@ int mmc_sw_reset(struct mmc_host *host);
void mmc_expect_errors_begin(struct mmc_host *host);
void mmc_expect_errors_end(struct mmc_host *host);
void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card);
+void mmc_retune_release(struct mmc_host *host);
+void mmc_retune_hold_now(struct mmc_host *host);
#endif /* LINUX_MMC_CORE_H */
--
2.22.0.rc2.383.gf4fbbf30c2-goog
Powered by blists - more mailing lists