Home | History | Annotate | Download | only in include
      1 /*
      2  * Copyright@ Samsung Electronics Co. LTD
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef _S3C_MEM_COMMON_H_
     18 #define _S3C_MEM_COMMON_H_
     19 
     20 #define MEM_IOCTL_MAGIC			'M'
     21 
     22 #define S3C_MEM_ALLOC			_IOWR(MEM_IOCTL_MAGIC, 310, struct s3c_mem_alloc)
     23 #define S3C_MEM_FREE			_IOWR(MEM_IOCTL_MAGIC, 311, struct s3c_mem_alloc)
     24 
     25 #define S3C_MEM_SHARE_ALLOC		_IOWR(MEM_IOCTL_MAGIC, 314, struct s3c_mem_alloc)
     26 #define S3C_MEM_SHARE_FREE		_IOWR(MEM_IOCTL_MAGIC, 315, struct s3c_mem_alloc)
     27 
     28 #define S3C_MEM_CACHEABLE_ALLOC		_IOWR(MEM_IOCTL_MAGIC, 316, struct s3c_mem_alloc)
     29 #define S3C_MEM_CACHEABLE_SHARE_ALLOC	_IOWR(MEM_IOCTL_MAGIC, 317, struct s3c_mem_alloc)
     30 
     31 #define S3C_MEM_DMA_COPY		_IOWR(MEM_IOCTL_MAGIC, 318, struct s3c_mem_dma_param)
     32 #define S3C_MEM_DMA_SET			_IOWR(MEM_IOCTL_MAGIC, 319, struct s3c_mem_dma_param)
     33 
     34 #define S3C_MEM_CACHE_INV			_IOWR(MEM_IOCTL_MAGIC, 330, struct s3c_mem_dma_param)
     35 
     36 
     37 struct s3c_mem_alloc {
     38 	int		size;
     39 	unsigned int 	vir_addr;
     40 	unsigned int 	phy_addr;
     41 };
     42 
     43 struct s3c_mem_dma_param {
     44 	int		size;
     45 	unsigned int 	src_addr;
     46 	unsigned int 	dst_addr;
     47 	int		cfg;
     48 };
     49 
     50 #if 0
     51 typedef struct _s3c_mem_t{
     52      int     dev_fd;
     53      struct  s3c_mem_alloc       mem_alloc_info;
     54 }s3c_mem_t;
     55 #endif
     56 #endif // _S3C_MEM_COMMON_H_
     57