error.h 763 B

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