OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 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 <linux/scatterlist.h> |
||
39 | #include <asm/byteorder.h> |
||
40 | #include <linux/skbuff.h> |
||
41 | #include <linux/netdevice.h> |
||
42 | #include <linux/version.h> |
||
43 | |||
44 | // must match the size of memory block allocated for g_dma_block and g_dma_block2 |
||
45 | #define DEU_MAX_PACKET_SIZE (PAGE_SIZE >> 1) |
||
46 | |||
47 | typedef struct ifx_deu_device { |
||
48 | struct dma_device_info *dma_device; |
||
49 | u8 *dst; |
||
50 | u8 *src; |
||
51 | int len; |
||
52 | int dst_count; |
||
53 | int src_count; |
||
54 | int recv_count; |
||
55 | int packet_size; |
||
56 | int packet_num; |
||
57 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)) |
||
58 | wait_queue_entry_t wait; |
||
59 | #else |
||
60 | wait_queue_t wait; |
||
61 | #endif |
||
62 | } _ifx_deu_device; |
||
63 | |||
64 | extern _ifx_deu_device ifx_deu[1]; |
||
65 | |||
66 | extern int deu_dma_intr_handler (struct dma_device_info *, int); |
||
67 | extern u8 *deu_dma_buffer_alloc (int, int *, void **); |
||
68 | extern int deu_dma_buffer_free (u8 *, void *); |
||
69 | extern void deu_dma_inactivate_poll(struct dma_device_info* dma_dev); |
||
70 | extern void deu_dma_activate_poll (struct dma_device_info* dma_dev); |
||
71 | extern struct dma_device_info* deu_dma_reserve(struct dma_device_info** dma_device); |
||
72 | extern int deu_dma_release(struct dma_device_info** dma_device); |
||
73 | |||
74 | #endif /* IFMIPS_DEU_DMA_H */ |