^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * CAAM Error Reporting code header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright 2009-2011 Freescale Semiconductor, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #ifndef CAAM_ERROR_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define CAAM_ERROR_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include "desc.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define CAAM_ERROR_STR_MAX 302
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) int caam_strstatus(struct device *dev, u32 status, bool qi_v2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define caam_jr_strstatus(jrdev, status) caam_strstatus(jrdev, status, false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define caam_qi2_strstatus(qidev, status) caam_strstatus(qidev, status, true)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) void caam_dump_sg(const char *prefix_str, int prefix_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) int rowsize, int groupsize, struct scatterlist *sg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) size_t tlen, bool ascii);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) static inline bool is_mdha(u32 algtype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) OP_ALG_CHA_MDHA;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #endif /* CAAM_ERROR_H */