[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230401165723.19762-3-quic_sartgarg@quicinc.com>
Date: Sat, 1 Apr 2023 22:27:23 +0530
From: Sarthak Garg <quic_sartgarg@...cinc.com>
To: adrian.hunter@...el.com, ulf.hansson@...aro.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, quic_rampraka@...cinc.com,
quic_bhaskarv@...cinc.com, quic_sachgupt@...cinc.com,
quic_pragalla@...cinc.com, quic_sayalil@...cinc.com,
Sarthak Garg <quic_sartgarg@...cinc.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Kees Cook <keescook@...omium.org>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Christian Löhle <CLoehle@...erstone.com>,
Yann Gautier <yann.gautier@...s.st.com>,
ChanWoo Lee <cw9316.lee@...sung.com>,
Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Ye Bin <yebin10@...wei.com>,
Alexander Stein <alexander.stein@...tq-group.com>,
Yu Zhe <yuzhe@...china.com>,
Yang Yingliang <yangyingliang@...wei.com>,
Brian Norris <briannorris@...omium.org>,
Linus Walleij <linus.walleij@...aro.org>,
Jens Axboe <axboe@...nel.dk>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Vincent Whitchurch <vincent.whitchurch@...s.com>,
David Sterba <dsterba@...e.com>,
John Garry <john.garry@...wei.com>
Subject: [PATCH V1 2/2] mmc: core: Export core functions to let vendors use for their features
Export core functions to let vendors use for their internal features.
Signed-off-by: Sarthak Garg <quic_sartgarg@...cinc.com>
---
drivers/mmc/core/core.c | 6 ++++++
drivers/mmc/core/host.c | 1 +
drivers/mmc/core/mmc.c | 18 ++++++++++++------
drivers/mmc/core/mmc_ops.c | 1 +
drivers/mmc/core/queue.c | 1 +
5 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 3d3e0ca52614..ed44b65f19e0 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -916,6 +916,7 @@ void mmc_set_clock(struct mmc_host *host, unsigned int hz)
host->ios.clock = hz;
mmc_set_ios(host);
}
+EXPORT_SYMBOL_GPL(mmc_set_clock);
int mmc_execute_tuning(struct mmc_card *card)
{
@@ -950,6 +951,7 @@ int mmc_execute_tuning(struct mmc_card *card)
return err;
}
+EXPORT_SYMBOL_GPL(mmc_execute_tuning);
/*
* Change the bus mode (open drain/push-pull) of a host.
@@ -959,6 +961,7 @@ void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode)
host->ios.bus_mode = mode;
mmc_set_ios(host);
}
+EXPORT_SYMBOL_GPL(mmc_set_bus_mode);
/*
* Change data bus width of a host.
@@ -968,6 +971,7 @@ void mmc_set_bus_width(struct mmc_host *host, unsigned int width)
host->ios.bus_width = width;
mmc_set_ios(host);
}
+EXPORT_SYMBOL_GPL(mmc_set_bus_width);
/*
* Set initial state after a power cycle or a hw_reset.
@@ -1001,6 +1005,7 @@ void mmc_set_initial_state(struct mmc_host *host)
mmc_crypto_set_initial_state(host);
}
+EXPORT_SYMBOL_GPL(mmc_set_initial_state);
/**
* mmc_vdd_to_ocrbitnum - Convert a voltage to the OCR bit number
@@ -1270,6 +1275,7 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing)
host->ios.timing = timing;
mmc_set_ios(host);
}
+EXPORT_SYMBOL_GPL(mmc_set_timing);
/*
* Select appropriate driver type for host.
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 76900f67c782..1c5eb1d9d585 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -166,6 +166,7 @@ void mmc_retune_hold(struct mmc_host *host)
host->retune_now = 1;
host->hold_retune += 1;
}
+EXPORT_SYMBOL(mmc_retune_hold);
void mmc_retune_release(struct mmc_host *host)
{
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 32386e4644df..b984a4f90535 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1002,7 +1002,7 @@ static void mmc_set_bus_speed(struct mmc_card *card)
* If the bus width is changed successfully, return the selected width value.
* Zero is returned instead of error value if the wide width is not supported.
*/
-static int mmc_select_bus_width(struct mmc_card *card)
+int mmc_select_bus_width(struct mmc_card *card)
{
static unsigned ext_csd_bits[] = {
EXT_CSD_BUS_WIDTH_8,
@@ -1067,11 +1067,12 @@ static int mmc_select_bus_width(struct mmc_card *card)
return err;
}
+EXPORT_SYMBOL_GPL(mmc_select_bus_width);
/*
* Switch to the high-speed mode
*/
-static int mmc_select_hs(struct mmc_card *card)
+int mmc_select_hs(struct mmc_card *card)
{
int err;
@@ -1085,11 +1086,12 @@ static int mmc_select_hs(struct mmc_card *card)
return err;
}
+EXPORT_SYMBOL_GPL(mmc_select_hs);
/*
* Activate wide bus and DDR if supported.
*/
-static int mmc_select_hs_ddr(struct mmc_card *card)
+int mmc_select_hs_ddr(struct mmc_card *card)
{
struct mmc_host *host = card->host;
u32 bus_width, ext_csd_bits;
@@ -1158,8 +1160,9 @@ static int mmc_select_hs_ddr(struct mmc_card *card)
return err;
}
+EXPORT_SYMBOL_GPL(mmc_select_hs_ddr);
-static int mmc_select_hs400(struct mmc_card *card)
+int mmc_select_hs400(struct mmc_card *card)
{
struct mmc_host *host = card->host;
unsigned int max_dtr;
@@ -1253,6 +1256,7 @@ static int mmc_select_hs400(struct mmc_card *card)
__func__, err);
return err;
}
+EXPORT_SYMBOL_GPL(mmc_select_hs400);
int mmc_hs200_to_hs400(struct mmc_card *card)
{
@@ -1533,7 +1537,7 @@ static int mmc_select_hs200(struct mmc_card *card)
/*
* Activate High Speed, HS200 or HS400ES mode if supported.
*/
-static int mmc_select_timing(struct mmc_card *card)
+int mmc_select_timing(struct mmc_card *card)
{
int err = 0;
@@ -1568,12 +1572,13 @@ static int mmc_select_timing(struct mmc_card *card)
mmc_set_bus_speed(card);
return 0;
}
+EXPORT_SYMBOL_GPL(mmc_select_timing);
/*
* Execute tuning sequence to seek the proper bus operating
* conditions for HS200 and HS400, which sends CMD21 to the device.
*/
-static int mmc_hs200_tuning(struct mmc_card *card)
+int mmc_hs200_tuning(struct mmc_card *card)
{
struct mmc_host *host = card->host;
@@ -1588,6 +1593,7 @@ static int mmc_hs200_tuning(struct mmc_card *card)
return mmc_execute_tuning(card);
}
+EXPORT_SYMBOL_GPL(mmc_hs200_tuning);
/*
* Handle the detection and initialisation of a card.
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 3b3adbddf664..62c16dac9d62 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -118,6 +118,7 @@ int mmc_select_card(struct mmc_card *card)
return _mmc_select_card(card->host, card);
}
+EXPORT_SYMBOL_GPL(mmc_select_card);
int mmc_deselect_cards(struct mmc_host *host)
{
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index b396e3900717..2c710d736032 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -69,6 +69,7 @@ enum mmc_issue_type mmc_issue_type(struct mmc_queue *mq, struct request *req)
return MMC_ISSUE_SYNC;
}
+EXPORT_SYMBOL_GPL(mmc_issue_type);
static void __mmc_cqe_recovery_notifier(struct mmc_queue *mq)
{
--
2.17.1
Powered by blists - more mailing lists