omap-crypto.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * OMAP Crypto driver common support routines.
  3. *
  4. * Copyright (c) 2017 Texas Instruments Incorporated
  5. * Tero Kristo <t-kristo@ti.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as published
  9. * by the Free Software Foundation.
  10. */
  11. #ifndef __CRYPTO_OMAP_CRYPTO_H
  12. #define __CRYPTO_OMAP_CRYPTO_H
  13. enum {
  14. OMAP_CRYPTO_NOT_ALIGNED = 1,
  15. OMAP_CRYPTO_BAD_DATA_LENGTH,
  16. };
  17. #define OMAP_CRYPTO_DATA_COPIED BIT(0)
  18. #define OMAP_CRYPTO_SG_COPIED BIT(1)
  19. #define OMAP_CRYPTO_COPY_MASK 0x3
  20. #define OMAP_CRYPTO_COPY_DATA BIT(0)
  21. #define OMAP_CRYPTO_FORCE_COPY BIT(1)
  22. #define OMAP_CRYPTO_ZERO_BUF BIT(2)
  23. #define OMAP_CRYPTO_FORCE_SINGLE_ENTRY BIT(3)
  24. int omap_crypto_align_sg(struct scatterlist **sg, int total, int bs,
  25. struct scatterlist *new_sg, u16 flags,
  26. u8 flags_shift, unsigned long *dd_flags);
  27. void omap_crypto_cleanup(struct scatterlist *sg, struct scatterlist *orig,
  28. int offset, int len, u8 flags_shift,
  29. unsigned long flags);
  30. #endif