1 /* drivers/char/s5p_vmem.h
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * Header file for s5p_vmem
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #if !defined(S5P_VMEM_H)
16 #define MEM_IOCTL_MAGIC 'M'
18 #define S5P_VMEM_ALLOC _IOWR(MEM_IOCTL_MAGIC, 0, struct s5p_vmem_alloc)
19 #define S5P_VMEM_FREE _IOWR(MEM_IOCTL_MAGIC, 1, struct s5p_vmem_alloc)
21 #define S5P_VMEM_SHARE_ALLOC _IOWR(MEM_IOCTL_MAGIC, 4, struct s5p_vmem_alloc)
22 #define S5P_VMEM_SHARE_FREE _IOWR(MEM_IOCTL_MAGIC, 5, struct s5p_vmem_alloc)
24 #define S5P_VMEM_CACHEABLE_ALLOC \
25 _IOWR(MEM_IOCTL_MAGIC, 6, struct s5p_vmem_alloc)
26 #define S5P_VMEM_CACHEABLE_SHARE_ALLOC \
27 _IOWR(MEM_IOCTL_MAGIC, 7, struct s5p_vmem_alloc)
28 #define S5P_VMEM_RESET _IOWR(MEM_IOCTL_MAGIC, 8, struct s5p_vmem_alloc)
30 #define S5P_VMEM_MAJOR 1
31 #define S5P_VMEM_MINOR 14
34 extern int s5p_vmem_mmap(struct file *filp, struct vm_area_struct *vma);
35 extern long s5p_vmem_ioctl(struct file *file, unsigned int cmd,
37 extern int s5p_vmem_open(struct inode *inode, struct file *file);
38 extern int s5p_vmem_release(struct inode *inode, struct file *file);
40 struct s5p_vmem_alloc {
42 unsigned long vir_addr;
44 unsigned long vir_addr_k;
47 #endif /* S5P_VMEM_H */