Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sysmmu.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd.
3  * http://www.samsung.com
4  *
5  * EXYNOS - System MMU support
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  */
11 
12 #ifndef _ARM_MACH_EXYNOS_SYSMMU_H_
13 #define _ARM_MACH_EXYNOS_SYSMMU_H_
14 
16  char *dbgname;
17  /* comma(,) separated list of clock names for clock gating */
18  char *clockname;
19 };
20 
21 #define SYSMMU_DEVNAME_BASE "exynos-sysmmu"
22 
23 #define SYSMMU_CLOCK_NAME "sysmmu"
24 #define SYSMMU_CLOCK_NAME2 "sysmmu_mc"
25 
26 #ifdef CONFIG_EXYNOS_DEV_SYSMMU
27 #include <linux/device.h>
28 struct platform_device;
29 
30 #define SYSMMU_PLATDEV(ipname) exynos_device_sysmmu_##ipname
31 
32 extern struct platform_device SYSMMU_PLATDEV(mfc_l);
33 extern struct platform_device SYSMMU_PLATDEV(mfc_r);
34 extern struct platform_device SYSMMU_PLATDEV(tv);
35 extern struct platform_device SYSMMU_PLATDEV(jpeg);
36 extern struct platform_device SYSMMU_PLATDEV(rot);
37 extern struct platform_device SYSMMU_PLATDEV(fimc0);
38 extern struct platform_device SYSMMU_PLATDEV(fimc1);
39 extern struct platform_device SYSMMU_PLATDEV(fimc2);
40 extern struct platform_device SYSMMU_PLATDEV(fimc3);
41 extern struct platform_device SYSMMU_PLATDEV(gsc0);
42 extern struct platform_device SYSMMU_PLATDEV(gsc1);
43 extern struct platform_device SYSMMU_PLATDEV(gsc2);
44 extern struct platform_device SYSMMU_PLATDEV(gsc3);
45 extern struct platform_device SYSMMU_PLATDEV(isp);
46 extern struct platform_device SYSMMU_PLATDEV(fimd0);
47 extern struct platform_device SYSMMU_PLATDEV(fimd1);
48 extern struct platform_device SYSMMU_PLATDEV(camif0);
49 extern struct platform_device SYSMMU_PLATDEV(camif1);
50 extern struct platform_device SYSMMU_PLATDEV(2d);
51 
52 #ifdef CONFIG_IOMMU_API
53 static inline void platform_set_sysmmu(
54  struct device *sysmmu, struct device *dev)
55 {
56  dev->archdata.iommu = sysmmu;
57 }
58 #endif
59 
60 #else /* !CONFIG_EXYNOS_DEV_SYSMMU */
61 #define platform_set_sysmmu(sysmmu, dev) do { } while (0)
62 #endif
63 
64 #define SYSMMU_CLOCK_DEVNAME(ipname, id) (SYSMMU_DEVNAME_BASE "." #id)
65 
66 #endif /* _ARM_MACH_EXYNOS_SYSMMU_H_ */