hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/caam/Kconfig
....@@ -1,7 +1,19 @@
1
+# SPDX-License-Identifier: GPL-2.0
2
+config CRYPTO_DEV_FSL_CAAM_COMMON
3
+ tristate
4
+
5
+config CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
6
+ tristate
7
+
8
+config CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
9
+ tristate
10
+
111 config CRYPTO_DEV_FSL_CAAM
2
- tristate "Freescale CAAM-Multicore driver backend"
12
+ tristate "Freescale CAAM-Multicore platform driver backend"
313 depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
414 select SOC_BUS
15
+ select CRYPTO_DEV_FSL_CAAM_COMMON
16
+ imply FSL_MC_BUS
517 help
618 Enables the driver module for Freescale's Cryptographic Accelerator
719 and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
....@@ -12,9 +24,17 @@
1224 To compile this driver as a module, choose M here: the module
1325 will be called caam.
1426
15
-config CRYPTO_DEV_FSL_CAAM_JR
27
+if CRYPTO_DEV_FSL_CAAM
28
+
29
+config CRYPTO_DEV_FSL_CAAM_DEBUG
30
+ bool "Enable debug output in CAAM driver"
31
+ help
32
+ Selecting this will enable printing of various debug
33
+ information in the CAAM driver.
34
+
35
+menuconfig CRYPTO_DEV_FSL_CAAM_JR
1636 tristate "Freescale CAAM Job Ring driver backend"
17
- depends on CRYPTO_DEV_FSL_CAAM
37
+ select CRYPTO_ENGINE
1838 default y
1939 help
2040 Enables the driver module for Job Rings which are part of
....@@ -25,9 +45,10 @@
2545 To compile this driver as a module, choose M here: the module
2646 will be called caam_jr.
2747
48
+if CRYPTO_DEV_FSL_CAAM_JR
49
+
2850 config CRYPTO_DEV_FSL_CAAM_RINGSIZE
2951 int "Job Ring size"
30
- depends on CRYPTO_DEV_FSL_CAAM_JR
3152 range 2 9
3253 default "9"
3354 help
....@@ -45,7 +66,6 @@
4566
4667 config CRYPTO_DEV_FSL_CAAM_INTC
4768 bool "Job Ring interrupt coalescing"
48
- depends on CRYPTO_DEV_FSL_CAAM_JR
4969 help
5070 Enable the Job Ring's interrupt coalescing feature.
5171
....@@ -74,26 +94,28 @@
7494 threshold. Range is 1-65535.
7595
7696 config CRYPTO_DEV_FSL_CAAM_CRYPTO_API
77
- tristate "Register algorithm implementations with the Crypto API"
78
- depends on CRYPTO_DEV_FSL_CAAM_JR
97
+ bool "Register algorithm implementations with the Crypto API"
7998 default y
99
+ select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
80100 select CRYPTO_AEAD
81101 select CRYPTO_AUTHENC
82
- select CRYPTO_BLKCIPHER
102
+ select CRYPTO_SKCIPHER
103
+ select CRYPTO_LIB_DES
104
+ select CRYPTO_XTS
83105 help
84106 Selecting this will offload crypto for users of the
85107 scatterlist crypto API (such as the linux native IPSec
86108 stack) to the SEC4 via job ring.
87109
88
- To compile this as a module, choose M here: the module
89
- will be called caamalg.
90
-
91110 config CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
92
- tristate "Queue Interface as Crypto API backend"
93
- depends on CRYPTO_DEV_FSL_CAAM_JR && FSL_DPAA && NET
111
+ bool "Queue Interface as Crypto API backend"
112
+ depends on FSL_DPAA && NET
94113 default y
114
+ select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
95115 select CRYPTO_AUTHENC
96
- select CRYPTO_BLKCIPHER
116
+ select CRYPTO_SKCIPHER
117
+ select CRYPTO_DES
118
+ select CRYPTO_XTS
97119 help
98120 Selecting this will use CAAM Queue Interface (QI) for sending
99121 & receiving crypto jobs to/from CAAM. This gives better performance
....@@ -102,53 +124,54 @@
102124 assigned to the kernel should also be more than the number of
103125 job rings.
104126
105
- To compile this as a module, choose M here: the module
106
- will be called caamalg_qi.
107
-
108127 config CRYPTO_DEV_FSL_CAAM_AHASH_API
109
- tristate "Register hash algorithm implementations with Crypto API"
110
- depends on CRYPTO_DEV_FSL_CAAM_JR
128
+ bool "Register hash algorithm implementations with Crypto API"
111129 default y
130
+ select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
112131 select CRYPTO_HASH
113132 help
114133 Selecting this will offload ahash for users of the
115134 scatterlist crypto API to the SEC4 via job ring.
116135
117
- To compile this as a module, choose M here: the module
118
- will be called caamhash.
119
-
120136 config CRYPTO_DEV_FSL_CAAM_PKC_API
121
- tristate "Register public key cryptography implementations with Crypto API"
122
- depends on CRYPTO_DEV_FSL_CAAM_JR
123
- default y
124
- select CRYPTO_RSA
125
- help
126
- Selecting this will allow SEC Public key support for RSA.
127
- Supported cryptographic primitives: encryption, decryption,
128
- signature and verification.
129
- To compile this as a module, choose M here: the module
130
- will be called caam_pkc.
137
+ bool "Register public key cryptography implementations with Crypto API"
138
+ default y
139
+ select CRYPTO_RSA
140
+ help
141
+ Selecting this will allow SEC Public key support for RSA.
142
+ Supported cryptographic primitives: encryption, decryption,
143
+ signature and verification.
131144
132145 config CRYPTO_DEV_FSL_CAAM_RNG_API
133
- tristate "Register caam device for hwrng API"
134
- depends on CRYPTO_DEV_FSL_CAAM_JR
146
+ bool "Register caam device for hwrng API"
135147 default y
136148 select CRYPTO_RNG
137149 select HW_RANDOM
138150 help
139151 Selecting this will register the SEC4 hardware rng to
140
- the hw_random API for suppying the kernel entropy pool.
152
+ the hw_random API for supplying the kernel entropy pool.
153
+
154
+endif # CRYPTO_DEV_FSL_CAAM_JR
155
+
156
+endif # CRYPTO_DEV_FSL_CAAM
157
+
158
+config CRYPTO_DEV_FSL_DPAA2_CAAM
159
+ tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
160
+ depends on FSL_MC_DPIO
161
+ depends on NETDEVICES
162
+ select CRYPTO_DEV_FSL_CAAM_COMMON
163
+ select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
164
+ select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
165
+ select CRYPTO_SKCIPHER
166
+ select CRYPTO_AUTHENC
167
+ select CRYPTO_AEAD
168
+ select CRYPTO_HASH
169
+ select CRYPTO_DES
170
+ select CRYPTO_XTS
171
+ help
172
+ CAAM driver for QorIQ Data Path Acceleration Architecture 2.
173
+ It handles DPSECI DPAA2 objects that sit on the Management Complex
174
+ (MC) fsl-mc bus.
141175
142176 To compile this as a module, choose M here: the module
143
- will be called caamrng.
144
-
145
-config CRYPTO_DEV_FSL_CAAM_DEBUG
146
- bool "Enable debug output in CAAM driver"
147
- depends on CRYPTO_DEV_FSL_CAAM
148
- help
149
- Selecting this will enable printing of various debug
150
- information in the CAAM driver.
151
-
152
-config CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
153
- def_tristate (CRYPTO_DEV_FSL_CAAM_CRYPTO_API || \
154
- CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI)
177
+ will be called dpaa2_caam.