Linux 4.19.133
[linux/fpc-iii.git] / drivers / crypto / omap-crypto.h
blob36a230eb87af8ac1bf97d5ac6be4b3cc12fe4094
1 /*
2 * OMAP Crypto driver common support routines.
4 * Copyright (c) 2017 Texas Instruments Incorporated
5 * Tero Kristo <t-kristo@ti.com>
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.
12 #ifndef __CRYPTO_OMAP_CRYPTO_H
13 #define __CRYPTO_OMAP_CRYPTO_H
15 enum {
16 OMAP_CRYPTO_NOT_ALIGNED = 1,
17 OMAP_CRYPTO_BAD_DATA_LENGTH,
20 #define OMAP_CRYPTO_DATA_COPIED BIT(0)
21 #define OMAP_CRYPTO_SG_COPIED BIT(1)
23 #define OMAP_CRYPTO_COPY_MASK 0x3
25 #define OMAP_CRYPTO_COPY_DATA BIT(0)
26 #define OMAP_CRYPTO_FORCE_COPY BIT(1)
27 #define OMAP_CRYPTO_ZERO_BUF BIT(2)
28 #define OMAP_CRYPTO_FORCE_SINGLE_ENTRY BIT(3)
30 int omap_crypto_align_sg(struct scatterlist **sg, int total, int bs,
31 struct scatterlist *new_sg, u16 flags,
32 u8 flags_shift, unsigned long *dd_flags);
33 void omap_crypto_cleanup(struct scatterlist *sg, struct scatterlist *orig,
34 int offset, int len, u8 flags_shift,
35 unsigned long flags);
37 #endif