xref: /linux/drivers/mmc/host/sdhci-cqhci.h (revision 0da908c291070d89482f6211dbe81d4d43c3f7cb)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright 2022 The Chromium OS Authors
4  *
5  * Support that applies to the combination of SDHCI and CQHCI, while not
6  * expressing a dependency between the two modules.
7  */
8 
9 #ifndef __MMC_HOST_SDHCI_CQHCI_H__
10 #define __MMC_HOST_SDHCI_CQHCI_H__
11 
12 #include "cqhci.h"
13 #include "sdhci.h"
14 
15 static inline void sdhci_and_cqhci_reset(struct sdhci_host *host, u8 mask)
16 {
17 	if ((host->mmc->caps2 & MMC_CAP2_CQE) && (mask & SDHCI_RESET_ALL) &&
18 	    host->mmc->cqe_private)
19 		cqhci_deactivate(host->mmc);
20 
21 	sdhci_reset(host, mask);
22 }
23 
24 #endif /* __MMC_HOST_SDHCI_CQHCI_H__ */
25