blob: dd4cbdb4cacc68c28fc7dfe1f4e2ff2b118f858d [file] [log] [blame]
codeworkxf1be2fe2012-03-24 17:38:29 +01001/*
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_CACHE_FLUSH _IOWR(MEM_IOCTL_MAGIC, 318, struct s3c_mem_alloc)
32#define S3C_MEM_CACHE_INVAL _IOWR(MEM_IOCTL_MAGIC, 319, struct s3c_mem_alloc)
33#define S3C_MEM_CACHE_CLEAN _IOWR(MEM_IOCTL_MAGIC, 320, struct s3c_mem_alloc)
34
35struct s3c_mem_alloc {
36 int size;
37 unsigned int vir_addr;
38 unsigned int phy_addr;
39};
40
41struct s3c_mem_dma_param {
42 int size;
43 unsigned int src_addr;
44 unsigned int dst_addr;
45 int cfg;
46};
47
48#endif // _S3C_MEM_COMMON_H_