0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CAAM_ERROR_H
0009 #define CAAM_ERROR_H
0010
0011 #include "desc.h"
0012
0013 #define CAAM_ERROR_STR_MAX 302
0014
0015 int caam_strstatus(struct device *dev, u32 status, bool qi_v2);
0016
0017 #define caam_jr_strstatus(jrdev, status) caam_strstatus(jrdev, status, false)
0018 #define caam_qi2_strstatus(qidev, status) caam_strstatus(qidev, status, true)
0019
0020 void caam_dump_sg(const char *prefix_str, int prefix_type,
0021 int rowsize, int groupsize, struct scatterlist *sg,
0022 size_t tlen, bool ascii);
0023
0024 static inline bool is_mdha(u32 algtype)
0025 {
0026 return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
0027 OP_ALG_CHA_MDHA;
0028 }
0029 #endif