]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/uapi/linux/pxp_device.h
e63a6e6eb4181b071ec98faf36fde50649ad0fcf
[karo-tx-linux.git] / include / uapi / linux / pxp_device.h
1 /*
2  * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. All Rights Reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17  *
18  */
19 #ifndef _UAPI_PXP_DEVICE
20 #define _UAPI_PXP_DEVICE
21
22 #include <linux/pxp_dma.h>
23
24 struct pxp_chan_handle {
25         unsigned int handle;
26         int hist_status;
27 };
28
29 struct pxp_mem_desc {
30         unsigned int handle;
31         unsigned int size;
32         dma_addr_t phys_addr;
33         unsigned int virt_uaddr;                /* virtual user space address */
34 };
35
36 #define PXP_IOC_MAGIC  'P'
37
38 #define PXP_IOC_GET_CHAN      _IOR(PXP_IOC_MAGIC, 0, struct pxp_mem_desc)
39 #define PXP_IOC_PUT_CHAN      _IOW(PXP_IOC_MAGIC, 1, struct pxp_mem_desc)
40 #define PXP_IOC_CONFIG_CHAN   _IOW(PXP_IOC_MAGIC, 2, struct pxp_mem_desc)
41 #define PXP_IOC_START_CHAN    _IOW(PXP_IOC_MAGIC, 3, struct pxp_mem_desc)
42 #define PXP_IOC_GET_PHYMEM    _IOWR(PXP_IOC_MAGIC, 4, struct pxp_mem_desc)
43 #define PXP_IOC_PUT_PHYMEM    _IOW(PXP_IOC_MAGIC, 5, struct pxp_mem_desc)
44 #define PXP_IOC_WAIT4CMPLT    _IOWR(PXP_IOC_MAGIC, 6, struct pxp_mem_desc)
45
46 #endif