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

Commit bd7d0754 authored by Ritesh Harjani's avatar Ritesh Harjani Committed by Gerrit - the friendly Code Review server
Browse files

mmc: sdhci: Notify sdhci-msm for enhanced strobe



Provide sdhci host ops of enhanced strobe to notify
sdhci-msm on enabling/disabling cmdq. This is needed
because of following:

Before running CMDQ transfers in HS400 Enhanced Strobe mode,
SW should write 3 to
HC_VENDOR_SPECIFIC_FUNC3.CMDEN_HS400_INPUT_MASK_CNT register.
Default reset value of this register is 2.

Change-Id: I987605cd21f137dea49ddf3e8db3f1f41b5b501f
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent 2d895cb5
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -3506,6 +3506,14 @@ static void sdhci_cmdq_set_block_size(struct mmc_host *mmc)
	sdhci_set_blk_size_reg(host, 512, 0);
}

static void sdhci_enhanced_strobe_mask(struct mmc_host *mmc, bool set)
{
	struct sdhci_host *host = mmc_priv(mmc);

	if (host->ops->enhanced_strobe_mask)
		host->ops->enhanced_strobe_mask(host, set);
}

static void sdhci_cmdq_clear_set_dumpregs(struct mmc_host *mmc, bool set)
{
	struct sdhci_host *host = mmc_priv(mmc);
@@ -3559,6 +3567,11 @@ static void sdhci_cmdq_set_block_size(struct mmc_host *mmc)

}

static void sdhci_enhanced_strobe_mask(struct mmc_host *mmc, bool set)
{

}

static void sdhci_cmdq_clear_set_dumpregs(struct mmc_host *mmc, bool set)
{

@@ -3580,6 +3593,7 @@ static const struct cmdq_host_ops sdhci_cmdq_ops = {
	.dump_vendor_regs = sdhci_cmdq_dump_vendor_regs,
	.set_block_size = sdhci_cmdq_set_block_size,
	.clear_set_dumpregs = sdhci_cmdq_clear_set_dumpregs,
	.enhanced_strobe_mask = sdhci_enhanced_strobe_mask,
	.crypto_cfg	= sdhci_cmdq_crypto_cfg,
	.post_cqe_halt = sdhci_cmdq_post_cqe_halt,
};
+1 −0
Original line number Diff line number Diff line
@@ -328,6 +328,7 @@ struct sdhci_ops {
					  u32 type);
	int	(*enable_controller_clock)(struct sdhci_host *host);
	void	(*clear_set_dumpregs)(struct sdhci_host *host, bool set);
	void	(*enhanced_strobe_mask)(struct sdhci_host *host, bool set);
};

#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS