6d16835b306da36853fe0ba5292c4b1e4700a671
1 /*
2 * File name: netapimod.h
3 *
4 * Description: NETAPI utility module header file.
5 *
6 * Copyright (C) 2012 Texas Instruments, Incorporated
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation version 2.
11 *
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
13 * whether express or implied; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 */
18 #ifndef __TI_NETAPIMOD_H__
19 #define __TI_NETAPIMOD_H__
21 #define NETAPIMOD_IOCMAGIC 0x0000fe00
23 /* Supported "base" ioctl cmds for the driver. */
24 #define NETAPIMOD_IOCGETPHYS 1
25 #define NETAPIMOD_IOCGETSIZE 2
26 #define NETAPIMOD_IOCCACHE 3
28 /* ioctl cmd "flavors" */
29 #define NETAPIMOD_WB 0x00010000
30 #define NETAPIMOD_INV 0x00020000
32 /* Supported "flavors" to "base" ioctl cmds for the driver. */
33 #define NETAPIMOD_IOCCACHEWBINV NETAPIMOD_IOCCACHE | NETAPIMOD_WB | NETAPIMOD_INV
34 #define NETAPIMOD_IOCCACHEWB NETAPIMOD_IOCCACHE | NETAPIMOD_WB
35 #define NETAPIMOD_IOCCACHEINV NETAPIMOD_IOCCACHE | NETAPIMOD_INV
37 #define NETAPIMOD_IOCCMDMASK 0x000000ff
39 /* Size of DMA coherent memory to be allocated */
40 #define NETAPIMOD_MEMSZ 0x200000
42 /* MMAP offsets */
43 /* Offset to map CMA allocated memory */
44 #define NETAPIMOD_MMAP_DMA_MEM_OFFSET 0
45 /* Offset to map QMSS Data register region */
46 #define NETAPIMOD_MMAP_QM_DATA_REG_MEM_OFFSET 0x44020000
48 struct netapimod_block {
49 unsigned long addr;
50 size_t size;
51 };
53 #endif /*__TI_NETAPIMOD_H__ */