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

Commit 283d847a authored by Adrian Hunter's avatar Adrian Hunter Committed by Sarthak Garg
Browse files

UPSTREAM: mmc: cqhci: Add cqhci_deactivate()



Host controllers can reset CQHCI either directly or as a consequence of
host controller reset. Add cqhci_deactivate() which puts the CQHCI
driver into a state that is consistent with that.

Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Link: https://lore.kernel.org/r/1583503724-13943-2-git-send-email-vbadigan@codeaurora.org


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Bug: 158284839
Git-repo: https://android.googlesource.com/kernel/common/


Git-Commit: a94dfc3e8b297efeeb7ae17d7d31c213d54f2d3e
Change-Id: Iaa1feaef3445ada7c8cb657fc662cd3287e6d683
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: default avatarSarthak Garg <sartgarg@codeaurora.org>
parent 0ea391ba
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -298,16 +298,16 @@ static void __cqhci_disable(struct cqhci_host *cq_host)
	cq_host->activated = false;
}

int cqhci_suspend(struct mmc_host *mmc)
int cqhci_deactivate(struct mmc_host *mmc)
{
	struct cqhci_host *cq_host = mmc->cqe_private;

	if (cq_host->enabled)
	if (cq_host->enabled && cq_host->activated)
		__cqhci_disable(cq_host);

	return 0;
}
EXPORT_SYMBOL(cqhci_suspend);
EXPORT_SYMBOL(cqhci_deactivate);

int cqhci_resume(struct mmc_host *mmc)
{
+5 −1
Original line number Diff line number Diff line
@@ -230,7 +230,11 @@ irqreturn_t cqhci_irq(struct mmc_host *mmc, u32 intmask, int cmd_error,
		      int data_error);
int cqhci_init(struct cqhci_host *cq_host, struct mmc_host *mmc, bool dma64);
struct cqhci_host *cqhci_pltfm_init(struct platform_device *pdev);
int cqhci_suspend(struct mmc_host *mmc);
int cqhci_deactivate(struct mmc_host *mmc);
static inline int cqhci_suspend(struct mmc_host *mmc)
{
	return cqhci_deactivate(mmc);
}
int cqhci_resume(struct mmc_host *mmc);

#endif