Root/package/platform/lantiq/ltq-deu/src/ifxmips_deu_dma.h

1/******************************************************************************
2**
3** FILE NAME : ifxmips_deu_dma.h
4** DESCRIPTION : Data Encryption Unit Driver
5** COPYRIGHT : Copyright (c) 2009
6** Infineon Technologies AG
7** Am Campeon 1-12, 85579 Neubiberg, Germany
8**
9** This program is free software; you can redistribute it and/or modify
10** it under the terms of the GNU General Public License as published by
11** the Free Software Foundation; either version 2 of the License, or
12** (at your option) any later version.
13**
14** HISTORY
15** $Date $Author $Comment
16** 08,Sept 2009 Mohammad Firdaus Initial UEIP release
17*******************************************************************************/
18
19/*!
20  \addtogroup IFX_DEU IFX_DEU_DRIVERS
21  \ingroup API
22  \brief ifx deu driver module
23*/
24
25/*!
26  \file ifxmips_deu_dma.h
27  \ingroup IFX_DEU
28  \brief DMA deu driver header file
29*/
30
31#ifndef IFXMIPS_DEU_DMA_H
32#define IFXMIPS_DEU_DMA_H
33
34#include <linux/init.h>
35#include <linux/module.h>
36#include <linux/mm.h>
37#include <linux/crypto.h>
38#include <asm/scatterlist.h>
39#include <asm/byteorder.h>
40#include <linux/skbuff.h>
41#include <linux/netdevice.h>
42
43// must match the size of memory block allocated for g_dma_block and g_dma_block2
44#define DEU_MAX_PACKET_SIZE (PAGE_SIZE >> 1)
45
46typedef struct ifx_deu_device {
47    struct dma_device_info *dma_device;
48    u8 *dst;
49    u8 *src;
50    int len;
51    int dst_count;
52    int src_count;
53    int recv_count;
54    int packet_size;
55    int packet_num;
56    wait_queue_t wait;
57} _ifx_deu_device;
58
59extern _ifx_deu_device ifx_deu[1];
60
61extern int deu_dma_intr_handler (struct dma_device_info *, int);
62extern u8 *deu_dma_buffer_alloc (int, int *, void **);
63extern int deu_dma_buffer_free (u8 *, void *);
64extern void deu_dma_inactivate_poll(struct dma_device_info* dma_dev);
65extern void deu_dma_activate_poll (struct dma_device_info* dma_dev);
66extern struct dma_device_info* deu_dma_reserve(struct dma_device_info** dma_device);
67extern int deu_dma_release(struct dma_device_info** dma_device);
68
69#endif /* IFMIPS_DEU_DMA_H */
70

Archive Download this file



interactive