···13841384 goto out_err;13851385 }1386138613871387+ /*13881388+ * Bump to HS timing and frequency. Some cards don't handle13891389+ * SEND_STATUS reliably at the initial frequency.13901390+ */13871391 mmc_set_timing(host, MMC_TIMING_MMC_HS);13921392+ mmc_set_bus_speed(card);13931393+13881394 err = mmc_switch_status(card, true);13891395 if (err)13901396 goto out_err;13911391-13921392- mmc_set_clock(host, card->ext_csd.hs_max_dtr);1393139713941398 /* Switch card to DDR with strobe bit */13951399 val = EXT_CSD_DDR_BUS_WIDTH_8 | EXT_CSD_BUS_WIDTH_STROBE;···14521448static int mmc_select_hs200(struct mmc_card *card)14531449{14541450 struct mmc_host *host = card->host;14551455- unsigned int old_timing, old_signal_voltage;14511451+ unsigned int old_timing, old_signal_voltage, old_clock;14561452 int err = -EINVAL;14571453 u8 val;14581454···14831479 false, true, MMC_CMD_RETRIES);14841480 if (err)14851481 goto err;14821482+14831483+ /*14841484+ * Bump to HS timing and frequency. Some cards don't handle14851485+ * SEND_STATUS reliably at the initial frequency.14861486+ * NB: We can't move to full (HS200) speeds until after we've14871487+ * successfully switched over.14881488+ */14861489 old_timing = host->ios.timing;14901490+ old_clock = host->ios.clock;14871491 mmc_set_timing(host, MMC_TIMING_MMC_HS200);14921492+ mmc_set_clock(card->host, card->ext_csd.hs_max_dtr);1488149314891494 /*14901495 * For HS200, CRC errors are not a reliable way to know the···15061493 * mmc_select_timing() assumes timing has not changed if15071494 * it is a switch error.15081495 */15091509- if (err == -EBADMSG)14961496+ if (err == -EBADMSG) {14971497+ mmc_set_clock(host, old_clock);15101498 mmc_set_timing(host, old_timing);14991499+ }15111500 }15121501err:15131502 if (err) {