@@ -1266,11 +1266,34 @@ out:
spin_unlock_irqrestore(&host->lock, flags);
}
+/*
+ * HW reset callback for eMMC4.4 card
+ * In this function, HC will do the real HW reset
+ * for eMMC4.4 card
+ *
+ * RETURN VALUE:
+ * 0: reset emmc successfully
+ * 1: reset emmc failed
+ * */
+static int sdhci_hardware_reset(struct mmc_host *mmc)
+{
+ int err = 1;
+ struct sdhci_host *host;
+
+ host = mmc_priv(mmc);
+
+ if (host->ops && host->ops->reset_emmc)
+ err = host->ops->reset_emmc(host);
+
+ return err;
+}
+
static const struct mmc_host_ops sdhci_ops = {
.request = sdhci_request,
.set_ios = sdhci_set_ios,
.get_ro = sdhci_get_ro,
.enable_sdio_irq = sdhci_enable_sdio_irq,
+ .hardware_reset = sdhci_hardware_reset,
};
/*****************************************************************************\
@@ -215,6 +215,7 @@ struct sdhci_ops {
void (*platform_send_init_74_clocks)(struct sdhci_host *host,
u8 power_mode);
unsigned int (*get_ro)(struct sdhci_host *host);
+ int (*reset_emmc)(struct sdhci_host *host);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS