2 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. All Rights Reserved.
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.
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.
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
19 #ifndef _UAPI_PXP_DEVICE
20 #define _UAPI_PXP_DEVICE
22 #include <linux/pxp_dma.h>
24 struct pxp_chan_handle {
33 unsigned int virt_uaddr; /* virtual user space address */
37 struct pxp_mem_flush {
42 #define PXP_IOC_MAGIC 'P'
44 #define PXP_IOC_GET_CHAN _IOR(PXP_IOC_MAGIC, 0, struct pxp_mem_desc)
45 #define PXP_IOC_PUT_CHAN _IOW(PXP_IOC_MAGIC, 1, struct pxp_mem_desc)
46 #define PXP_IOC_CONFIG_CHAN _IOW(PXP_IOC_MAGIC, 2, struct pxp_mem_desc)
47 #define PXP_IOC_START_CHAN _IOW(PXP_IOC_MAGIC, 3, struct pxp_mem_desc)
48 #define PXP_IOC_GET_PHYMEM _IOWR(PXP_IOC_MAGIC, 4, struct pxp_mem_desc)
49 #define PXP_IOC_PUT_PHYMEM _IOW(PXP_IOC_MAGIC, 5, struct pxp_mem_desc)
50 #define PXP_IOC_WAIT4CMPLT _IOWR(PXP_IOC_MAGIC, 6, struct pxp_mem_desc)
51 #define PXP_IOC_FLUSH_PHYMEM _IOR(PXP_IOC_MAGIC, 7, struct pxp_mem_flush)
53 /* Memory types supported*/
54 #define MEMORY_TYPE_UNCACHED 0x0
55 #define MEMORY_TYPE_WC 0x1
56 #define MEMORY_TYPE_CACHED 0x2
58 /* Cache flush operations */
59 #define CACHE_CLEAN 0x1
60 #define CACHE_INVALIDATE 0x2
61 #define CACHE_FLUSH 0x4