Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef96c5fa authored by Ritesh Harjani's avatar Ritesh Harjani Committed by Venkat Gopalakrishnan
Browse files

mmc: sdhci: Add hs400 enhanced strobe mode support to host



This adds hs400 enhanced strobe mode(emmc 5.1 feature)
support to sdhci host.

Change-Id: Ib65905fa263553842cd55f38edccc135cac4bcf9
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent ae923989
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ static void sdhci_finish_data(struct sdhci_host *);

static void sdhci_finish_command(struct sdhci_host *);
static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode);
static int sdhci_enhanced_strobe(struct mmc_host *mmc);
static void sdhci_tuning_timer(unsigned long data);
static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable);
static void sdhci_show_adma_error(struct sdhci_host *host);
@@ -2274,6 +2275,19 @@ static int sdhci_card_busy(struct mmc_host *mmc)
	return !(present_state & SDHCI_DATA_LVL_MASK);
}

static int sdhci_enhanced_strobe(struct mmc_host *mmc)
{
	struct sdhci_host *host = mmc_priv(mmc);
	int err = 0;

	sdhci_runtime_pm_get(host);
	if (host->ops->enhanced_strobe)
		err = host->ops->enhanced_strobe(host);
	sdhci_runtime_pm_put(host);

	return err;
}

static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
{
	struct sdhci_host *host = mmc_priv(mmc);
@@ -2539,6 +2553,7 @@ static const struct mmc_host_ops sdhci_ops = {
	.enable_sdio_irq = sdhci_enable_sdio_irq,
	.start_signal_voltage_switch	= sdhci_start_signal_voltage_switch,
	.execute_tuning			= sdhci_execute_tuning,
	.enhanced_strobe		= sdhci_enhanced_strobe,
	.card_event			= sdhci_card_event,
	.card_busy	= sdhci_card_busy,
	.enable		= sdhci_enable,
+1 −0
Original line number Diff line number Diff line
@@ -320,6 +320,7 @@ struct sdhci_ops {
#define REQ_IO_LOW	(1 << 2)
#define REQ_IO_HIGH	(1 << 3)
	void    (*card_event)(struct sdhci_host *host);
	int	(*enhanced_strobe)(struct sdhci_host *host);
	void	(*platform_bus_voting)(struct sdhci_host *host, u32 enable);
	void	(*dump_vendor_regs)(struct sdhci_host *host);
	int	(*config_auto_tuning_cmd)(struct sdhci_host *host,