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

Commit 243538e5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci-msm: avoid using NOP ADMA descriptor for EOT"

parents 5325b9fb 9feffb4d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1427,6 +1427,8 @@ int mmc_cmdq_halt(struct mmc_host *host, bool halt)
	mmc_host_clk_hold(host);
	if (host->cmdq_ops->halt) {
		err = host->cmdq_ops->halt(host, halt);
		if (!err && host->ops->notify_halt)
			host->ops->notify_halt(host, halt);
		if (!err && halt)
			mmc_host_set_halt(host);
		else if (!err && !halt)
+1 −0
Original line number Diff line number Diff line
@@ -3187,6 +3187,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
	host->quirks |= SDHCI_QUIRK_SINGLE_POWER_WRITE;
	host->quirks |= SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN;
	host->quirks |= SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC;
	host->quirks2 |= SDHCI_QUIRK2_ALWAYS_USE_BASE_CLOCK;
	host->quirks2 |= SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE;
	host->quirks2 |= SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD;
+15 −0
Original line number Diff line number Diff line
@@ -1529,6 +1529,20 @@ static int sdhci_disable(struct mmc_host *mmc)
	return 0;
}

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

	pr_debug("%s: halt notification was sent, halt=%d\n",
		mmc_hostname(mmc), halt);
	if (host->flags & SDHCI_USE_ADMA_64BIT) {
		if (halt)
			host->adma_desc_line_sz = 16;
		else
			host->adma_desc_line_sz = 12;
	}
}

static inline void sdhci_update_power_policy(struct sdhci_host *host,
		enum sdhci_power_policy policy)
{
@@ -2559,6 +2573,7 @@ static const struct mmc_host_ops sdhci_ops = {
	.enable		= sdhci_enable,
	.disable	= sdhci_disable,
	.notify_load	= sdhci_notify_load,
	.notify_halt	= sdhci_notify_halt,
};

/*****************************************************************************\
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ struct mmc_host_ops {
	unsigned long (*get_max_frequency)(struct mmc_host *host);
	unsigned long (*get_min_frequency)(struct mmc_host *host);
	int	(*notify_load)(struct mmc_host *, enum mmc_load);
	void	(*notify_halt)(struct mmc_host *mmc, bool halt);
};

struct mmc_card;