blob: a10790a614ec8995dc31451843d581aa999b19a3 [file] [log] [blame]
Kukjin Kim3db3ae52011-02-14 16:22:36 +09001/* linux/arch/arm/mach-exynos4/dev-sysmmu.c
Donguk Ryuccbc8762011-01-13 13:40:29 +09002 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
Kukjin Kim3db3ae52011-02-14 16:22:36 +09006 * EXYNOS4 - System MMU support
7 *
Donguk Ryuccbc8762011-01-13 13:40:29 +09008 * 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.
11 */
12
13#include <linux/platform_device.h>
14#include <linux/dma-mapping.h>
15
16#include <mach/map.h>
17#include <mach/irqs.h>
18
Kukjin Kim3db3ae52011-02-14 16:22:36 +090019static struct resource exynos4_sysmmu_resource[] = {
Donguk Ryuccbc8762011-01-13 13:40:29 +090020 [0] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090021 .start = EXYNOS4_PA_SYSMMU_MDMA,
22 .end = EXYNOS4_PA_SYSMMU_MDMA + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090023 .flags = IORESOURCE_MEM,
24 },
25 [1] = {
26 .start = IRQ_SYSMMU_MDMA0_0,
27 .end = IRQ_SYSMMU_MDMA0_0,
28 .flags = IORESOURCE_IRQ,
29 },
30 [2] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090031 .start = EXYNOS4_PA_SYSMMU_SSS,
32 .end = EXYNOS4_PA_SYSMMU_SSS + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090033 .flags = IORESOURCE_MEM,
34 },
35 [3] = {
36 .start = IRQ_SYSMMU_SSS_0,
37 .end = IRQ_SYSMMU_SSS_0,
38 .flags = IORESOURCE_IRQ,
39 },
40 [4] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090041 .start = EXYNOS4_PA_SYSMMU_FIMC0,
42 .end = EXYNOS4_PA_SYSMMU_FIMC0 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090043 .flags = IORESOURCE_MEM,
44 },
45 [5] = {
46 .start = IRQ_SYSMMU_FIMC0_0,
47 .end = IRQ_SYSMMU_FIMC0_0,
48 .flags = IORESOURCE_IRQ,
49 },
50 [6] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090051 .start = EXYNOS4_PA_SYSMMU_FIMC1,
52 .end = EXYNOS4_PA_SYSMMU_FIMC1 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090053 .flags = IORESOURCE_MEM,
54 },
55 [7] = {
56 .start = IRQ_SYSMMU_FIMC1_0,
57 .end = IRQ_SYSMMU_FIMC1_0,
58 .flags = IORESOURCE_IRQ,
59 },
60 [8] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090061 .start = EXYNOS4_PA_SYSMMU_FIMC2,
62 .end = EXYNOS4_PA_SYSMMU_FIMC2 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090063 .flags = IORESOURCE_MEM,
64 },
65 [9] = {
66 .start = IRQ_SYSMMU_FIMC2_0,
67 .end = IRQ_SYSMMU_FIMC2_0,
68 .flags = IORESOURCE_IRQ,
69 },
70 [10] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090071 .start = EXYNOS4_PA_SYSMMU_FIMC3,
72 .end = EXYNOS4_PA_SYSMMU_FIMC3 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090073 .flags = IORESOURCE_MEM,
74 },
75 [11] = {
76 .start = IRQ_SYSMMU_FIMC3_0,
77 .end = IRQ_SYSMMU_FIMC3_0,
78 .flags = IORESOURCE_IRQ,
79 },
80 [12] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090081 .start = EXYNOS4_PA_SYSMMU_JPEG,
82 .end = EXYNOS4_PA_SYSMMU_JPEG + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090083 .flags = IORESOURCE_MEM,
84 },
85 [13] = {
86 .start = IRQ_SYSMMU_JPEG_0,
87 .end = IRQ_SYSMMU_JPEG_0,
88 .flags = IORESOURCE_IRQ,
89 },
90 [14] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +090091 .start = EXYNOS4_PA_SYSMMU_FIMD0,
92 .end = EXYNOS4_PA_SYSMMU_FIMD0 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +090093 .flags = IORESOURCE_MEM,
94 },
95 [15] = {
96 .start = IRQ_SYSMMU_LCD0_M0_0,
97 .end = IRQ_SYSMMU_LCD0_M0_0,
98 .flags = IORESOURCE_IRQ,
99 },
100 [16] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900101 .start = EXYNOS4_PA_SYSMMU_FIMD1,
102 .end = EXYNOS4_PA_SYSMMU_FIMD1 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900103 .flags = IORESOURCE_MEM,
104 },
105 [17] = {
106 .start = IRQ_SYSMMU_LCD1_M1_0,
107 .end = IRQ_SYSMMU_LCD1_M1_0,
108 .flags = IORESOURCE_IRQ,
109 },
110 [18] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900111 .start = EXYNOS4_PA_SYSMMU_PCIe,
112 .end = EXYNOS4_PA_SYSMMU_PCIe + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900113 .flags = IORESOURCE_MEM,
114 },
115 [19] = {
116 .start = IRQ_SYSMMU_PCIE_0,
117 .end = IRQ_SYSMMU_PCIE_0,
118 .flags = IORESOURCE_IRQ,
119 },
120 [20] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900121 .start = EXYNOS4_PA_SYSMMU_G2D,
122 .end = EXYNOS4_PA_SYSMMU_G2D + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900123 .flags = IORESOURCE_MEM,
124 },
125 [21] = {
126 .start = IRQ_SYSMMU_2D_0,
127 .end = IRQ_SYSMMU_2D_0,
128 .flags = IORESOURCE_IRQ,
129 },
130 [22] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900131 .start = EXYNOS4_PA_SYSMMU_ROTATOR,
132 .end = EXYNOS4_PA_SYSMMU_ROTATOR + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900133 .flags = IORESOURCE_MEM,
134 },
135 [23] = {
136 .start = IRQ_SYSMMU_ROTATOR_0,
137 .end = IRQ_SYSMMU_ROTATOR_0,
138 .flags = IORESOURCE_IRQ,
139 },
140 [24] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900141 .start = EXYNOS4_PA_SYSMMU_MDMA2,
142 .end = EXYNOS4_PA_SYSMMU_MDMA2 + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900143 .flags = IORESOURCE_MEM,
144 },
145 [25] = {
146 .start = IRQ_SYSMMU_MDMA1_0,
147 .end = IRQ_SYSMMU_MDMA1_0,
148 .flags = IORESOURCE_IRQ,
149 },
150 [26] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900151 .start = EXYNOS4_PA_SYSMMU_TV,
152 .end = EXYNOS4_PA_SYSMMU_TV + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900153 .flags = IORESOURCE_MEM,
154 },
155 [27] = {
156 .start = IRQ_SYSMMU_TV_M0_0,
157 .end = IRQ_SYSMMU_TV_M0_0,
158 .flags = IORESOURCE_IRQ,
159 },
160 [28] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900161 .start = EXYNOS4_PA_SYSMMU_MFC_L,
162 .end = EXYNOS4_PA_SYSMMU_MFC_L + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900163 .flags = IORESOURCE_MEM,
164 },
165 [29] = {
166 .start = IRQ_SYSMMU_MFC_M0_0,
167 .end = IRQ_SYSMMU_MFC_M0_0,
168 .flags = IORESOURCE_IRQ,
169 },
170 [30] = {
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900171 .start = EXYNOS4_PA_SYSMMU_MFC_R,
172 .end = EXYNOS4_PA_SYSMMU_MFC_R + SZ_64K - 1,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900173 .flags = IORESOURCE_MEM,
174 },
175 [31] = {
176 .start = IRQ_SYSMMU_MFC_M1_0,
177 .end = IRQ_SYSMMU_MFC_M1_0,
178 .flags = IORESOURCE_IRQ,
179 },
180};
181
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900182struct platform_device exynos4_device_sysmmu = {
Donguk Ryuccbc8762011-01-13 13:40:29 +0900183 .name = "s5p-sysmmu",
184 .id = 32,
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900185 .num_resources = ARRAY_SIZE(exynos4_sysmmu_resource),
186 .resource = exynos4_sysmmu_resource,
Donguk Ryuccbc8762011-01-13 13:40:29 +0900187};
188
Kukjin Kim3db3ae52011-02-14 16:22:36 +0900189EXPORT_SYMBOL(exynos4_device_sysmmu);