mmc_host_clk_release(host);
}
+void mmc_finish_tuning(struct mmc_host *host)
+{
+ host->ios.finish_tuning_flag = 1;
+ mmc_set_ios(host);
+ host->ios.finish_tuning_flag = 0;
+}
+
void mmc_set_tuning(struct mmc_host *host, unsigned int tuning)
{
WARN_ON(tuning < host->tuning_min);
void mmc_set_chip_select(struct mmc_host *host, int mode);
void mmc_set_clock(struct mmc_host *host, unsigned int hz);
void mmc_set_tuning(struct mmc_host *host, unsigned int tuning);
+void mmc_finish_tuning(struct mmc_host *host);
void mmc_gate_clock(struct mmc_host *host);
void mmc_ungate_clock(struct mmc_host *host);
void mmc_set_ungated(struct mmc_host *host);
avg = (min + max) / 2;
mmc_set_tuning(card->host, avg);
mmc_send_tuning_cmd(card);
+ mmc_finish_tuning(card->host);
}
#else
if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning)
if (host->flags & SDHCI_DEVICE_DEAD)
goto out;
+ if (ios->finish_tuning_flag) {
+ if (host->ops->post_tuning)
+ host->ops->post_tuning(host);
+ goto out;
+ }
+
if (ios->tuning_flag) {
/* means this request is for tuning only */
if (host->ops->pre_tuning)
int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs);
void (*pre_tuning)(struct sdhci_host *host, u32 val);
+ void (*post_tuning)(struct sdhci_host *host);
void (*platform_clk_ctrl)(struct sdhci_host *host, bool enable);
};
#define MMC_SET_DRIVER_TYPE_C 2
#define MMC_SET_DRIVER_TYPE_D 3
unsigned int tuning_flag; /* request tuning only */
+ unsigned int finish_tuning_flag;
unsigned int tuning; /* tuning parameter */
};