Loading drivers/mmc/host/sdhci-msm.c +17 −0 Original line number Diff line number Diff line Loading @@ -1143,6 +1143,7 @@ int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) bool drv_type_changed = false; struct mmc_card *card = host->mmc->card; int sts_retry; u8 last_good_phase = 0; /* * Tuning is required for SDR104, HS200 and HS400 cards and Loading Loading @@ -1228,6 +1229,22 @@ int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) mmc_wait_for_req(mmc, &mrq); if (card && (cmd.error || data.error)) { /* * Set the dll to last known good phase while sending * status command to ensure that status command won't * fail due to bad phase. */ if (tuned_phase_cnt) last_good_phase = tuned_phases[tuned_phase_cnt-1]; else if (msm_host->saved_tuning_phase != INVALID_TUNING_PHASE) last_good_phase = msm_host->saved_tuning_phase; rc = msm_config_cm_dll_phase(host, last_good_phase); if (rc) goto kfree; sts_cmd.opcode = MMC_SEND_STATUS; sts_cmd.arg = card->rca << 16; sts_cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; Loading Loading
drivers/mmc/host/sdhci-msm.c +17 −0 Original line number Diff line number Diff line Loading @@ -1143,6 +1143,7 @@ int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) bool drv_type_changed = false; struct mmc_card *card = host->mmc->card; int sts_retry; u8 last_good_phase = 0; /* * Tuning is required for SDR104, HS200 and HS400 cards and Loading Loading @@ -1228,6 +1229,22 @@ int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode) mmc_wait_for_req(mmc, &mrq); if (card && (cmd.error || data.error)) { /* * Set the dll to last known good phase while sending * status command to ensure that status command won't * fail due to bad phase. */ if (tuned_phase_cnt) last_good_phase = tuned_phases[tuned_phase_cnt-1]; else if (msm_host->saved_tuning_phase != INVALID_TUNING_PHASE) last_good_phase = msm_host->saved_tuning_phase; rc = msm_config_cm_dll_phase(host, last_good_phase); if (rc) goto kfree; sts_cmd.opcode = MMC_SEND_STATUS; sts_cmd.arg = card->rca << 16; sts_cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; Loading