@@ -1684,6 +1684,15 @@ static int sdhci_do_3_3v_signal_voltage_switch(struct sdhci_host *host,
return -EIO;
}
}
+
+ /*
+ * May need to apply soc/platfrom settings for the
+ * voltage switch
+ */
+ if (host->ops->signal_voltage_switch)
+ host->ops->signal_voltage_switch(host,
+ host->mmc->ios.signal_voltage);
+
/* Wait for 5ms */
usleep_range(5000, 5500);
@@ -1726,6 +1735,14 @@ static int sdhci_do_1_8v_signal_voltage_switch(struct sdhci_host *host,
ret = 0;
if (!ret) {
+ /*
+ * May need to apply soc/platfrom settings for the
+ * voltage switch
+ */
+ if (host->ops->signal_voltage_switch)
+ host->ops->signal_voltage_switch(host,
+ host->mmc->ios.signal_voltage);
+
ctrl |= SDHCI_CTRL_VDD_180;
sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
@@ -290,6 +290,7 @@ struct sdhci_ops {
void (*hw_reset)(struct sdhci_host *host);
void (*platform_suspend)(struct sdhci_host *host);
void (*platform_resume)(struct sdhci_host *host);
+ void (*signal_voltage_switch)(struct sdhci_host *host, u8 vol);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS