HS400 mode doesn't need to do execute_tuning, because it's already tuned in HS200 mode. And Tuning command is optional for UHS50 mode. In future, the general execute_tuning sequence can be included in this function. Signed-off-by: Jaehoon Chung <jh80.chung@xxxxxxxxxxx> --- drivers/mmc/host/dw_mmc.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 22dacae..6571924 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1568,10 +1568,25 @@ static int dw_mci_execute_tuning(struct mmc_host *mmc, u32 opcode) struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci *host = slot->host; const struct dw_mci_drv_data *drv_data = host->drv_data; - int err = -EINVAL; + int err = 0; + + switch (host->timing) { + case MMC_TIMING_MMC_HS400: + err = -EINVAL; + goto out; + case MMC_TIMING_MMC_HS200: + case MMC_TIMING_UHS_SDR104: + case MMC_TIMING_UHS_DDR50: + break; + case MMC_TIMING_UHS_SDR50: + /* Fall through */ + default: + goto out; + } if (drv_data && drv_data->execute_tuning) err = drv_data->execute_tuning(slot, opcode); +out: return err; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html