mmc: mediatek: do not tune data for HS400 mode
for hs400 mode, should only tune DS delay, should not tune PAD_TUNE for data path. if eMMC will run at hs400 mode, do not tune data while call ops->execute_tuning(). Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
faecf41106
commit
5462ff39c4
|
@ -326,6 +326,7 @@ struct msdc_host {
|
||||||
unsigned char timing;
|
unsigned char timing;
|
||||||
bool vqmmc_enabled;
|
bool vqmmc_enabled;
|
||||||
u32 hs400_ds_delay;
|
u32 hs400_ds_delay;
|
||||||
|
bool hs400_mode; /* current eMMC will run at hs400 mode */
|
||||||
struct msdc_save_para save_para; /* used when gate HCLK */
|
struct msdc_save_para save_para; /* used when gate HCLK */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1402,9 +1403,11 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
|
||||||
dev_err(host->dev, "Tune response fail!\n");
|
dev_err(host->dev, "Tune response fail!\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
if (host->hs400_mode == false) {
|
||||||
ret = msdc_tune_data(mmc, opcode);
|
ret = msdc_tune_data(mmc, opcode);
|
||||||
if (ret == -EIO)
|
if (ret == -EIO)
|
||||||
dev_err(host->dev, "Tune data fail!\n");
|
dev_err(host->dev, "Tune data fail!\n");
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1412,6 +1415,7 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
|
||||||
static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
|
static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||||
{
|
{
|
||||||
struct msdc_host *host = mmc_priv(mmc);
|
struct msdc_host *host = mmc_priv(mmc);
|
||||||
|
host->hs400_mode = true;
|
||||||
|
|
||||||
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
|
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue