hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/caam/error.h
....@@ -7,10 +7,23 @@
77
88 #ifndef CAAM_ERROR_H
99 #define CAAM_ERROR_H
10
-#define CAAM_ERROR_STR_MAX 302
11
-void caam_jr_strstatus(struct device *jrdev, u32 status);
1210
13
-void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
11
+#include "desc.h"
12
+
13
+#define CAAM_ERROR_STR_MAX 302
14
+
15
+int caam_strstatus(struct device *dev, u32 status, bool qi_v2);
16
+
17
+#define caam_jr_strstatus(jrdev, status) caam_strstatus(jrdev, status, false)
18
+#define caam_qi2_strstatus(qidev, status) caam_strstatus(qidev, status, true)
19
+
20
+void caam_dump_sg(const char *prefix_str, int prefix_type,
1421 int rowsize, int groupsize, struct scatterlist *sg,
1522 size_t tlen, bool ascii);
23
+
24
+static inline bool is_mdha(u32 algtype)
25
+{
26
+ return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
27
+ OP_ALG_CHA_MDHA;
28
+}
1629 #endif /* CAAM_ERROR_H */