Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / include / linux / broadcom / vc_mem.h
1 /*
2  * Copyright 2010 - 2011 Broadcom Corporation.  All rights reserved.
3  *
4  * Unless you and Broadcom execute a separate written software license
5  * agreement governing use of this software, this software is licensed to you
6  * under the terms of the GNU General Public License version 2, available at
7  * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
8  *
9  * Notwithstanding the above, under no circumstances may you combine this
10  * software in any way with any other Broadcom software provided under a
11  * license other than the GPL, without Broadcom's express prior written
12  * consent.
13  */
14
15 #ifndef _VC_MEM_H
16 #define _VC_MEM_H
17
18 #include <linux/ioctl.h>
19
20 #define VC_MEM_IOC_MAGIC  'v'
21
22 #define VC_MEM_IOC_MEM_PHYS_ADDR    _IOR(VC_MEM_IOC_MAGIC, 0, unsigned long)
23 #define VC_MEM_IOC_MEM_SIZE         _IOR(VC_MEM_IOC_MAGIC, 1, unsigned int)
24 #define VC_MEM_IOC_MEM_BASE         _IOR(VC_MEM_IOC_MAGIC, 2, unsigned int)
25 #define VC_MEM_IOC_MEM_LOAD         _IOR(VC_MEM_IOC_MAGIC, 3, unsigned int)
26
27 #ifdef __KERNEL__
28 #define VC_MEM_TO_ARM_ADDR_MASK 0x3FFFFFFF
29
30 extern unsigned long mm_vc_mem_phys_addr;
31 extern unsigned int  mm_vc_mem_size;
32 extern int vc_mem_get_current_size(void);
33 #endif
34
35 #ifdef CONFIG_COMPAT
36 #define VC_MEM_IOC_MEM_PHYS_ADDR32  _IOR(VC_MEM_IOC_MAGIC, 0, compat_ulong_t)
37 #endif
38
39 #endif  /* _VC_MEM_H */