gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / crypto / omap-crypto.h
blob506ccde6f3808c6a91fba0dbbdb32d6e561847b0
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * OMAP Crypto driver common support routines.
5 * Copyright (c) 2017 Texas Instruments Incorporated
6 * Tero Kristo <t-kristo@ti.com>
7 */
9 #ifndef __CRYPTO_OMAP_CRYPTO_H
10 #define __CRYPTO_OMAP_CRYPTO_H
12 enum {
13 OMAP_CRYPTO_NOT_ALIGNED = 1,
14 OMAP_CRYPTO_BAD_DATA_LENGTH,
17 #define OMAP_CRYPTO_DATA_COPIED BIT(0)
18 #define OMAP_CRYPTO_SG_COPIED BIT(1)
20 #define OMAP_CRYPTO_COPY_MASK 0x3
22 #define OMAP_CRYPTO_COPY_DATA BIT(0)
23 #define OMAP_CRYPTO_FORCE_COPY BIT(1)
24 #define OMAP_CRYPTO_ZERO_BUF BIT(2)
25 #define OMAP_CRYPTO_FORCE_SINGLE_ENTRY BIT(3)
27 int omap_crypto_align_sg(struct scatterlist **sg, int total, int bs,
28 struct scatterlist *new_sg, u16 flags,
29 u8 flags_shift, unsigned long *dd_flags);
30 void omap_crypto_cleanup(struct scatterlist *sg, struct scatterlist *orig,
31 int offset, int len, u8 flags_shift,
32 unsigned long flags);
34 #endif