diff options
author | John Crispin <john@openwrt.org> | 2012-12-15 02:00:05 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2012-12-15 02:00:05 +0000 |
commit | c2e2323e1dfeb0e3f6f5f038f77c24ca415dbb0d (patch) | |
tree | af3281a2a31f503b89a1ca7e2b6e2c2dd8e67009 /package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h | |
parent | 65d9ff50546d8b244357ec7189d98a40fb616ec8 (diff) | |
download | master-31e0f0ae-c2e2323e1dfeb0e3f6f5f038f77c24ca415dbb0d.tar.gz master-31e0f0ae-c2e2323e1dfeb0e3f6f5f038f77c24ca415dbb0d.tar.bz2 master-31e0f0ae-c2e2323e1dfeb0e3f6f5f038f77c24ca415dbb0d.zip |
add ltq-deu
SVN-Revision: 34689
Diffstat (limited to 'package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h')
-rw-r--r-- | package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h b/package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h new file mode 100644 index 0000000000..5198a4a11f --- /dev/null +++ b/package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h @@ -0,0 +1,69 @@ +/****************************************************************************** +** +** FILE NAME : ifxmips_deu_dma.h +** DESCRIPTION : Data Encryption Unit Driver +** COPYRIGHT : Copyright (c) 2009 +** Infineon Technologies AG +** Am Campeon 1-12, 85579 Neubiberg, Germany +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** HISTORY +** $Date $Author $Comment +** 08,Sept 2009 Mohammad Firdaus Initial UEIP release +*******************************************************************************/ + +/*! + \addtogroup IFX_DEU IFX_DEU_DRIVERS + \ingroup API + \brief ifx deu driver module +*/ + +/*! + \file ifxmips_deu_dma.h + \ingroup IFX_DEU + \brief DMA deu driver header file +*/ + +#ifndef IFXMIPS_DEU_DMA_H +#define IFXMIPS_DEU_DMA_H + +#include <linux/init.h> +#include <linux/module.h> +#include <linux/mm.h> +#include <linux/crypto.h> +#include <asm/scatterlist.h> +#include <asm/byteorder.h> +#include <linux/skbuff.h> +#include <linux/netdevice.h> + +// must match the size of memory block allocated for g_dma_block and g_dma_block2 +#define DEU_MAX_PACKET_SIZE (PAGE_SIZE >> 1) + +typedef struct ifx_deu_device { + struct dma_device_info *dma_device; + u8 *dst; + u8 *src; + int len; + int dst_count; + int src_count; + int recv_count; + int packet_size; + int packet_num; + wait_queue_t wait; +} _ifx_deu_device; + +extern _ifx_deu_device ifx_deu[1]; + +extern int deu_dma_intr_handler (struct dma_device_info *, int); +extern u8 *deu_dma_buffer_alloc (int, int *, void **); +extern int deu_dma_buffer_free (u8 *, void *); +extern void deu_dma_inactivate_poll(struct dma_device_info* dma_dev); +extern void deu_dma_activate_poll (struct dma_device_info* dma_dev); +extern struct dma_device_info* deu_dma_reserve(struct dma_device_info** dma_device); +extern int deu_dma_release(struct dma_device_info** dma_device); + +#endif /* IFMIPS_DEU_DMA_H */ |