FROMLIST: mmc: core: Export core functions required for clk scaling
Export core function required for clk scaling post design change. This would help make clk scaling part of vendor module. Bug: 192337957 Link: https://lore.kernel.org/lkml/1571668177-3766-2-git-send-email- rampraka@codeaurora.org/ Change-Id: I0c5eccb2052197b3a290f7322429cab679c5ade5 Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org> Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
This commit is contained in:

committed by
Nitin Rawat

parent
bef08a94ff
commit
072eded7ca
@@ -917,6 +917,7 @@ void mmc_set_clock(struct mmc_host *host, unsigned int hz)
|
|||||||
host->ios.clock = hz;
|
host->ios.clock = hz;
|
||||||
mmc_set_ios(host);
|
mmc_set_ios(host);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_set_clock);
|
||||||
|
|
||||||
int mmc_execute_tuning(struct mmc_card *card)
|
int mmc_execute_tuning(struct mmc_card *card)
|
||||||
{
|
{
|
||||||
@@ -996,6 +997,7 @@ void mmc_set_initial_state(struct mmc_host *host)
|
|||||||
|
|
||||||
mmc_crypto_set_initial_state(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
|
* mmc_vdd_to_ocrbitnum - Convert a voltage to the OCR bit number
|
||||||
@@ -1259,6 +1261,7 @@ void mmc_set_timing(struct mmc_host *host, unsigned int timing)
|
|||||||
host->ios.timing = timing;
|
host->ios.timing = timing;
|
||||||
mmc_set_ios(host);
|
mmc_set_ios(host);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_set_timing);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Select appropriate driver type for host.
|
* Select appropriate driver type for host.
|
||||||
|
@@ -43,7 +43,7 @@ struct device_node *mmc_of_find_child_device(struct mmc_host *host,
|
|||||||
void mmc_init_erase(struct mmc_card *card);
|
void mmc_init_erase(struct mmc_card *card);
|
||||||
|
|
||||||
void mmc_set_chip_select(struct mmc_host *host, int mode);
|
void mmc_set_chip_select(struct mmc_host *host, int mode);
|
||||||
void mmc_set_clock(struct mmc_host *host, unsigned int hz);
|
extern void mmc_set_clock(struct mmc_host *host, unsigned int hz);
|
||||||
void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode);
|
void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode);
|
||||||
void mmc_set_bus_width(struct mmc_host *host, unsigned int width);
|
void mmc_set_bus_width(struct mmc_host *host, unsigned int width);
|
||||||
u32 mmc_select_voltage(struct mmc_host *host, u32 ocr);
|
u32 mmc_select_voltage(struct mmc_host *host, u32 ocr);
|
||||||
|
@@ -972,7 +972,7 @@ static int mmc_select_powerclass(struct mmc_card *card)
|
|||||||
/*
|
/*
|
||||||
* Set the bus speed for the selected speed mode.
|
* Set the bus speed for the selected speed mode.
|
||||||
*/
|
*/
|
||||||
static void mmc_set_bus_speed(struct mmc_card *card)
|
void mmc_set_bus_speed(struct mmc_card *card)
|
||||||
{
|
{
|
||||||
unsigned int max_dtr = (unsigned int)-1;
|
unsigned int max_dtr = (unsigned int)-1;
|
||||||
|
|
||||||
@@ -992,7 +992,7 @@ static void mmc_set_bus_speed(struct mmc_card *card)
|
|||||||
* If the bus width is changed successfully, return the selected width value.
|
* 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.
|
* 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[] = {
|
static unsigned ext_csd_bits[] = {
|
||||||
EXT_CSD_BUS_WIDTH_8,
|
EXT_CSD_BUS_WIDTH_8,
|
||||||
@@ -1057,11 +1057,12 @@ static int mmc_select_bus_width(struct mmc_card *card)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_select_bus_width);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Switch to the high-speed mode
|
* 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;
|
int err;
|
||||||
|
|
||||||
@@ -1075,11 +1076,12 @@ static int mmc_select_hs(struct mmc_card *card)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_select_hs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activate wide bus and DDR if supported.
|
* 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;
|
struct mmc_host *host = card->host;
|
||||||
u32 bus_width, ext_csd_bits;
|
u32 bus_width, ext_csd_bits;
|
||||||
@@ -1148,8 +1150,9 @@ static int mmc_select_hs_ddr(struct mmc_card *card)
|
|||||||
|
|
||||||
return err;
|
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;
|
struct mmc_host *host = card->host;
|
||||||
unsigned int max_dtr;
|
unsigned int max_dtr;
|
||||||
@@ -1235,6 +1238,7 @@ out_err:
|
|||||||
__func__, err);
|
__func__, err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_select_hs400);
|
||||||
|
|
||||||
int mmc_hs200_to_hs400(struct mmc_card *card)
|
int mmc_hs200_to_hs400(struct mmc_card *card)
|
||||||
{
|
{
|
||||||
@@ -1505,7 +1509,7 @@ err:
|
|||||||
/*
|
/*
|
||||||
* Activate High Speed, HS200 or HS400ES mode if supported.
|
* 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;
|
int err = 0;
|
||||||
|
|
||||||
@@ -1530,12 +1534,13 @@ bus_speed:
|
|||||||
mmc_set_bus_speed(card);
|
mmc_set_bus_speed(card);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_select_timing);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute tuning sequence to seek the proper bus operating
|
* Execute tuning sequence to seek the proper bus operating
|
||||||
* conditions for HS200 and HS400, which sends CMD21 to the device.
|
* 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;
|
struct mmc_host *host = card->host;
|
||||||
|
|
||||||
@@ -1550,6 +1555,7 @@ static int mmc_hs200_tuning(struct mmc_card *card)
|
|||||||
|
|
||||||
return mmc_execute_tuning(card);
|
return mmc_execute_tuning(card);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_hs200_tuning);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle the detection and initialisation of a card.
|
* Handle the detection and initialisation of a card.
|
||||||
|
@@ -71,6 +71,7 @@ enum mmc_issue_type mmc_issue_type(struct mmc_queue *mq, struct request *req)
|
|||||||
|
|
||||||
return MMC_ISSUE_SYNC;
|
return MMC_ISSUE_SYNC;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mmc_issue_type);
|
||||||
|
|
||||||
static void __mmc_cqe_recovery_notifier(struct mmc_queue *mq)
|
static void __mmc_cqe_recovery_notifier(struct mmc_queue *mq)
|
||||||
{
|
{
|
||||||
|
@@ -449,4 +449,13 @@ static inline bool mmc_ready_for_data(u32 status)
|
|||||||
|
|
||||||
#define mmc_driver_type_mask(n) (1 << (n))
|
#define mmc_driver_type_mask(n) (1 << (n))
|
||||||
|
|
||||||
|
struct mmc_card;
|
||||||
|
|
||||||
|
extern int mmc_select_bus_width(struct mmc_card *card);
|
||||||
|
extern int mmc_select_hs(struct mmc_card *card);
|
||||||
|
extern int mmc_select_hs_ddr(struct mmc_card *card);
|
||||||
|
extern int mmc_select_hs400(struct mmc_card *card);
|
||||||
|
extern int mmc_hs200_tuning(struct mmc_card *card);
|
||||||
|
extern int mmc_select_timing(struct mmc_card *card);
|
||||||
|
|
||||||
#endif /* LINUX_MMC_MMC_H */
|
#endif /* LINUX_MMC_MMC_H */
|
||||||
|
Reference in New Issue
Block a user