xref: /openbmc/linux/drivers/mmc/core/crypto.h (revision 249592bf)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * MMC crypto engine (inline encryption) support
4  *
5  * Copyright 2020 Google LLC
6  */
7 
8 #ifndef _MMC_CORE_CRYPTO_H
9 #define _MMC_CORE_CRYPTO_H
10 
11 struct mmc_host;
12 struct mmc_queue_req;
13 struct request_queue;
14 
15 #ifdef CONFIG_MMC_CRYPTO
16 
17 void mmc_crypto_set_initial_state(struct mmc_host *host);
18 
19 void mmc_crypto_setup_queue(struct request_queue *q, struct mmc_host *host);
20 
21 void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq);
22 
23 #else /* CONFIG_MMC_CRYPTO */
24 
25 static inline void mmc_crypto_set_initial_state(struct mmc_host *host)
26 {
27 }
28 
29 static inline void mmc_crypto_setup_queue(struct request_queue *q,
30 					  struct mmc_host *host)
31 {
32 }
33 
34 static inline void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq)
35 {
36 }
37 
38 #endif /* !CONFIG_MMC_CRYPTO */
39 
40 #endif /* _MMC_CORE_CRYPTO_H */
41