diff options
author | Fancy Fang <B47543@freescale.com> | 2013-12-25 18:04:56 +0800 |
---|---|---|
committer | Fancy Fang <B47543@freescale.com> | 2014-01-06 17:01:08 +0800 |
commit | 41a580610db728d8b8423f0d952cf76a473c4e76 (patch) | |
tree | 63429515db6d5214bb217910903c88070883ddeb /include | |
parent | 4245f865cac15d45884a7817c8508d6a503b45ff (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')
-rw-r--r-- | include/uapi/linux/pxp_device.h | 17 |
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 |