#ifndef NXP_ADMA_H
#define NXP_ADMA_H

#include <linux/dmaengine.h>

enum nxp_adma_aes_mode {
	nxp_aes_mode_ecb,
	nxp_aes_mode_cbc,
	nxp_aes_mode_ctr
};

#define NXP_AES_KEY_LENGTH 16
#define NXP_AES_IV_LENGTH  16

struct nxp_adma_platform_data {
	dma_cap_mask_t cap_mask;
	size_t pool_size;
};

extern void nxp_adma_cpi_submit(u32 descriptor_table, bool chan);
extern void nxp_adma_cpi_register(void(*irq_handler)(u32));
extern void nxp_adma_aes_setup(bool encrypt, enum nxp_adma_aes_mode mode, u8 *key, u8 *iv, size_t len);
extern dma_cookie_t dma_async_memcpy_buf_to_buf_crypt(struct dma_chan *chan, void *dest, void *src, size_t len);

#endif

