mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
mmc: core: Add host specific tuning support for SD HS mode
To support the need for host specific tuning for SD high-speed mode, let's add two new optional callbacks, ->prepare|execute_sd_hs_tuning() and let's call them when switching into the SD high-speed mode. Note that, during the tuning process it's also needed for host drivers to send commands to the SD card to verify that the tuning process succeeds. Therefore, let's also share the corresponding functions from the core to allow this. Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com> Link: https://lore.kernel.org/r/20230825091743.15613-2-wenchao.chen@unisoc.com [Ulf: Dropped unnecessary function declarations and updated the commit msg] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
committed by
Ulf Hansson
parent
48fe8fadbe
commit
bac806830f
@@ -184,6 +184,12 @@ struct mmc_host_ops {
|
||||
/* Execute HS400 tuning depending host driver */
|
||||
int (*execute_hs400_tuning)(struct mmc_host *host, struct mmc_card *card);
|
||||
|
||||
/* Optional callback to prepare for SD high-speed tuning */
|
||||
int (*prepare_sd_hs_tuning)(struct mmc_host *host, struct mmc_card *card);
|
||||
|
||||
/* Optional callback to execute SD high-speed tuning */
|
||||
int (*execute_sd_hs_tuning)(struct mmc_host *host, struct mmc_card *card);
|
||||
|
||||
/* Prepare switch to DDR during the HS400 init sequence */
|
||||
int (*hs400_prepare_ddr)(struct mmc_host *host);
|
||||
|
||||
@@ -665,6 +671,8 @@ static inline void mmc_debugfs_err_stats_inc(struct mmc_host *host,
|
||||
host->err_stats[stat] += 1;
|
||||
}
|
||||
|
||||
int mmc_sd_switch(struct mmc_card *card, int mode, int group, u8 value, u8 *resp);
|
||||
int mmc_send_status(struct mmc_card *card, u32 *status);
|
||||
int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
|
||||
int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode);
|
||||
int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd);
|
||||
|
||||
Reference in New Issue
Block a user