18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * CAAM Error Reporting code header 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2009-2011 Freescale Semiconductor, Inc. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef CAAM_ERROR_H 98c2ecf20Sopenharmony_ci#define CAAM_ERROR_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include "desc.h" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define CAAM_ERROR_STR_MAX 302 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciint caam_strstatus(struct device *dev, u32 status, bool qi_v2); 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define caam_jr_strstatus(jrdev, status) caam_strstatus(jrdev, status, false) 188c2ecf20Sopenharmony_ci#define caam_qi2_strstatus(qidev, status) caam_strstatus(qidev, status, true) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_civoid caam_dump_sg(const char *prefix_str, int prefix_type, 218c2ecf20Sopenharmony_ci int rowsize, int groupsize, struct scatterlist *sg, 228c2ecf20Sopenharmony_ci size_t tlen, bool ascii); 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_cistatic inline bool is_mdha(u32 algtype) 258c2ecf20Sopenharmony_ci{ 268c2ecf20Sopenharmony_ci return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) == 278c2ecf20Sopenharmony_ci OP_ALG_CHA_MDHA; 288c2ecf20Sopenharmony_ci} 298c2ecf20Sopenharmony_ci#endif /* CAAM_ERROR_H */ 30