sdhci-cqhci.h 609 B

123456789101112131415161718192021222324
  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. #ifndef __MMC_HOST_SDHCI_CQHCI_H__
  9. #define __MMC_HOST_SDHCI_CQHCI_H__
  10. #include "cqhci.h"
  11. #include "sdhci.h"
  12. static inline void sdhci_and_cqhci_reset(struct sdhci_host *host, u8 mask)
  13. {
  14. if ((host->mmc->caps2 & MMC_CAP2_CQE) && (mask & SDHCI_RESET_ALL) &&
  15. host->mmc->cqe_private)
  16. cqhci_deactivate(host->mmc);
  17. sdhci_reset(host, mask);
  18. }
  19. #endif /* __MMC_HOST_SDHCI_CQHCI_H__ */