crypto.h 820 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * MMC crypto engine (inline encryption) support
  4. *
  5. * Copyright 2020 Google LLC
  6. */
  7. #ifndef _MMC_CORE_CRYPTO_H
  8. #define _MMC_CORE_CRYPTO_H
  9. struct mmc_host;
  10. struct mmc_queue_req;
  11. struct request_queue;
  12. #ifdef CONFIG_MMC_CRYPTO
  13. void mmc_crypto_set_initial_state(struct mmc_host *host);
  14. void mmc_crypto_setup_queue(struct request_queue *q, struct mmc_host *host);
  15. void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq);
  16. #else /* CONFIG_MMC_CRYPTO */
  17. static inline void mmc_crypto_set_initial_state(struct mmc_host *host)
  18. {
  19. }
  20. static inline void mmc_crypto_setup_queue(struct request_queue *q,
  21. struct mmc_host *host)
  22. {
  23. }
  24. static inline void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq)
  25. {
  26. }
  27. #endif /* !CONFIG_MMC_CRYPTO */
  28. #endif /* _MMC_CORE_CRYPTO_H */