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

Commit 912dec18 authored by Baolin Wang's avatar Baolin Wang Committed by Todd Kjos
Browse files

UPSTREAM: mmc: host: sdhci: Add request_done ops for struct sdhci_ops



Add request_done ops for struct sdhci_ops as a preparation in case some
host controllers have different method to complete one request, such as
supporting request completion of MMC software queue.

bug: 151514181
Suggested-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarBaolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/1539c801c8bbdbcd1d86f8c2dab375f5803c765a.1581478568.git.baolin.wang7@gmail.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 1774b0021405b4d312499095f6d3919b5bdf3e3b)
Change-Id: Ida382cff72fb6352be3fefc7ccf3166f48eb72fd
parent ddc6f87e
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -2727,6 +2727,9 @@ static bool sdhci_request_done(struct sdhci_host *host)

	spin_unlock_irqrestore(&host->lock, flags);

	if (host->ops->request_done)
		host->ops->request_done(host, mrq);
	else
		mmc_request_done(host->mmc, mrq);

	return false;
@@ -3155,7 +3158,12 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)

	/* Process mrqs ready for immediate completion */
	for (i = 0; i < SDHCI_MAX_MRQS; i++) {
		if (mrqs_done[i])
		if (!mrqs_done[i])
			continue;

		if (host->ops->request_done)
			host->ops->request_done(host, mrqs_done[i]);
		else
			mmc_request_done(host->mmc, mrqs_done[i]);
	}

+2 −0
Original line number Diff line number Diff line
@@ -646,6 +646,8 @@ struct sdhci_ops {
	void	(*voltage_switch)(struct sdhci_host *host);
	void	(*adma_write_desc)(struct sdhci_host *host, void **desc,
				   dma_addr_t addr, int len, unsigned int cmd);
	void	(*request_done)(struct sdhci_host *host,
				struct mmc_request *mrq);
};

#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS