mmc: core: Export a few functions needed for blkmq support

The following functions are needed by the mmc block device driver, once it
converts to blkmq, therefore let's export them.

mmc_start_bkops()
mmc_start_request()
mmc_retune_hold_now()
mmc_retune_release()

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Adrian Hunter 2017-09-22 15:36:59 +03:00 committed by Ulf Hansson
parent 27d70d3680
commit cb39f61e9b
5 changed files with 12 additions and 8 deletions

View File

@ -337,7 +337,7 @@ static int mmc_mrq_prep(struct mmc_host *host, struct mmc_request *mrq)
return 0; return 0;
} }
static int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
{ {
int err; int err;
@ -359,6 +359,7 @@ static int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
return 0; return 0;
} }
EXPORT_SYMBOL(mmc_start_request);
/* /*
* mmc_wait_data_done() - done callback for data request * mmc_wait_data_done() - done callback for data request

View File

@ -107,6 +107,8 @@ static inline void mmc_unregister_pm_notifier(struct mmc_host *host) { }
void mmc_wait_for_req_done(struct mmc_host *host, struct mmc_request *mrq); void mmc_wait_for_req_done(struct mmc_host *host, struct mmc_request *mrq);
bool mmc_is_req_done(struct mmc_host *host, struct mmc_request *mrq); bool mmc_is_req_done(struct mmc_host *host, struct mmc_request *mrq);
int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq);
struct mmc_async_req; struct mmc_async_req;
struct mmc_async_req *mmc_start_areq(struct mmc_host *host, struct mmc_async_req *mmc_start_areq(struct mmc_host *host,

View File

@ -111,12 +111,6 @@ void mmc_retune_hold(struct mmc_host *host)
host->hold_retune += 1; host->hold_retune += 1;
} }
void mmc_retune_hold_now(struct mmc_host *host)
{
host->retune_now = 0;
host->hold_retune += 1;
}
void mmc_retune_release(struct mmc_host *host) void mmc_retune_release(struct mmc_host *host)
{ {
if (host->hold_retune) if (host->hold_retune)
@ -124,6 +118,7 @@ void mmc_retune_release(struct mmc_host *host)
else else
WARN_ON(1); WARN_ON(1);
} }
EXPORT_SYMBOL(mmc_retune_release);
int mmc_retune(struct mmc_host *host) int mmc_retune(struct mmc_host *host)
{ {

View File

@ -19,12 +19,17 @@ void mmc_unregister_host_class(void);
void mmc_retune_enable(struct mmc_host *host); void mmc_retune_enable(struct mmc_host *host);
void mmc_retune_disable(struct mmc_host *host); void mmc_retune_disable(struct mmc_host *host);
void mmc_retune_hold(struct mmc_host *host); void mmc_retune_hold(struct mmc_host *host);
void mmc_retune_hold_now(struct mmc_host *host);
void mmc_retune_release(struct mmc_host *host); void mmc_retune_release(struct mmc_host *host);
int mmc_retune(struct mmc_host *host); int mmc_retune(struct mmc_host *host);
void mmc_retune_pause(struct mmc_host *host); void mmc_retune_pause(struct mmc_host *host);
void mmc_retune_unpause(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) static inline void mmc_retune_recheck(struct mmc_host *host)
{ {
if (host->hold_retune <= 1) if (host->hold_retune <= 1)

View File

@ -1007,6 +1007,7 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception)
else else
mmc_retune_release(card->host); mmc_retune_release(card->host);
} }
EXPORT_SYMBOL(mmc_start_bkops);
/* /*
* Flush the cache to the non-volatile storage. * Flush the cache to the non-volatile storage.