summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorFancy Fang <B47543@freescale.com>2013-12-25 18:04:56 +0800
committerNitin Garg <nitin.garg@freescale.com>2014-08-27 18:06:49 -0500
commitcb4ab828cbcb667b702894770d61d2c09b2b4261 (patch)
treea5000bcae6bbda51d09792dbf46005ce20c49c1c /include/uapi
parent6749214ffd80ae077f09eb6ea6c87b462565b79b (diff)
ENGR00293323 PXP: add WC and cacheable dma buffer support for PXP device
This change add support for new dma buffer type(writecombine and cacheable) which allows user application has more choices for the buffer type. And if the dma buffer is cacheable, then add flush interfaces to make it cache coherent when necessary. Signed-off-by: Fancy Fang <B47543@freescale.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/pxp_device.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/uapi/linux/pxp_device.h b/include/uapi/linux/pxp_device.h
index e63a6e6eb418..fce89ce066bb 100644
--- a/include/uapi/linux/pxp_device.h
+++ b/include/uapi/linux/pxp_device.h
@@ -31,6 +31,12 @@ struct pxp_mem_desc {
unsigned int size;
dma_addr_t phys_addr;
unsigned int virt_uaddr; /* virtual user space address */
+ unsigned int mtype;
+};
+
+struct pxp_mem_flush {
+ unsigned int handle;
+ unsigned int type;
};
#define PXP_IOC_MAGIC 'P'
@@ -42,5 +48,16 @@ struct pxp_mem_desc {
#define PXP_IOC_GET_PHYMEM _IOWR(PXP_IOC_MAGIC, 4, struct pxp_mem_desc)
#define PXP_IOC_PUT_PHYMEM _IOW(PXP_IOC_MAGIC, 5, struct pxp_mem_desc)
#define PXP_IOC_WAIT4CMPLT _IOWR(PXP_IOC_MAGIC, 6, struct pxp_mem_desc)
+#define PXP_IOC_FLUSH_PHYMEM _IOR(PXP_IOC_MAGIC, 7, struct pxp_mem_flush)
+
+/* Memory types supported*/
+#define MEMORY_TYPE_UNCACHED 0x0
+#define MEMORY_TYPE_WC 0x1
+#define MEMORY_TYPE_CACHED 0x2
+
+/* Cache flush operations */
+#define CACHE_CLEAN 0x1
+#define CACHE_INVALIDATE 0x2
+#define CACHE_FLUSH 0x4
#endif