diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 196 |
1 files changed, 195 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index fb9b5427a068..484ca2dabdeb 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -107,7 +107,7 @@ static struct sh_timer_config cmt_platform_data = { | |||
107 | .timer_bit = 5, | 107 | .timer_bit = 5, |
108 | .clk = "cmt0", | 108 | .clk = "cmt0", |
109 | .clockevent_rating = 125, | 109 | .clockevent_rating = 125, |
110 | .clocksource_rating = 200, | 110 | .clocksource_rating = 125, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | static struct resource cmt_resources[] = { | 113 | static struct resource cmt_resources[] = { |
@@ -133,6 +133,188 @@ static struct platform_device cmt_device = { | |||
133 | .num_resources = ARRAY_SIZE(cmt_resources), | 133 | .num_resources = ARRAY_SIZE(cmt_resources), |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static struct sh_timer_config tmu0_platform_data = { | ||
137 | .name = "TMU0", | ||
138 | .channel_offset = 0x04, | ||
139 | .timer_bit = 0, | ||
140 | .clk = "tmu0", | ||
141 | .clockevent_rating = 200, | ||
142 | }; | ||
143 | |||
144 | static struct resource tmu0_resources[] = { | ||
145 | [0] = { | ||
146 | .name = "TMU0", | ||
147 | .start = 0xffd80008, | ||
148 | .end = 0xffd80013, | ||
149 | .flags = IORESOURCE_MEM, | ||
150 | }, | ||
151 | [1] = { | ||
152 | .start = 16, | ||
153 | .flags = IORESOURCE_IRQ, | ||
154 | }, | ||
155 | }; | ||
156 | |||
157 | static struct platform_device tmu0_device = { | ||
158 | .name = "sh_tmu", | ||
159 | .id = 0, | ||
160 | .dev = { | ||
161 | .platform_data = &tmu0_platform_data, | ||
162 | }, | ||
163 | .resource = tmu0_resources, | ||
164 | .num_resources = ARRAY_SIZE(tmu0_resources), | ||
165 | }; | ||
166 | |||
167 | static struct sh_timer_config tmu1_platform_data = { | ||
168 | .name = "TMU1", | ||
169 | .channel_offset = 0x10, | ||
170 | .timer_bit = 1, | ||
171 | .clk = "tmu0", | ||
172 | .clocksource_rating = 200, | ||
173 | }; | ||
174 | |||
175 | static struct resource tmu1_resources[] = { | ||
176 | [0] = { | ||
177 | .name = "TMU1", | ||
178 | .start = 0xffd80014, | ||
179 | .end = 0xffd8001f, | ||
180 | .flags = IORESOURCE_MEM, | ||
181 | }, | ||
182 | [1] = { | ||
183 | .start = 17, | ||
184 | .flags = IORESOURCE_IRQ, | ||
185 | }, | ||
186 | }; | ||
187 | |||
188 | static struct platform_device tmu1_device = { | ||
189 | .name = "sh_tmu", | ||
190 | .id = 1, | ||
191 | .dev = { | ||
192 | .platform_data = &tmu1_platform_data, | ||
193 | }, | ||
194 | .resource = tmu1_resources, | ||
195 | .num_resources = ARRAY_SIZE(tmu1_resources), | ||
196 | }; | ||
197 | |||
198 | static struct sh_timer_config tmu2_platform_data = { | ||
199 | .name = "TMU2", | ||
200 | .channel_offset = 0x1c, | ||
201 | .timer_bit = 2, | ||
202 | .clk = "tmu0", | ||
203 | }; | ||
204 | |||
205 | static struct resource tmu2_resources[] = { | ||
206 | [0] = { | ||
207 | .name = "TMU2", | ||
208 | .start = 0xffd80020, | ||
209 | .end = 0xffd8002b, | ||
210 | .flags = IORESOURCE_MEM, | ||
211 | }, | ||
212 | [1] = { | ||
213 | .start = 18, | ||
214 | .flags = IORESOURCE_IRQ, | ||
215 | }, | ||
216 | }; | ||
217 | |||
218 | static struct platform_device tmu2_device = { | ||
219 | .name = "sh_tmu", | ||
220 | .id = 2, | ||
221 | .dev = { | ||
222 | .platform_data = &tmu2_platform_data, | ||
223 | }, | ||
224 | .resource = tmu2_resources, | ||
225 | .num_resources = ARRAY_SIZE(tmu2_resources), | ||
226 | }; | ||
227 | |||
228 | static struct sh_timer_config tmu3_platform_data = { | ||
229 | .name = "TMU3", | ||
230 | .channel_offset = 0x04, | ||
231 | .timer_bit = 0, | ||
232 | .clk = "tmu1", | ||
233 | }; | ||
234 | |||
235 | static struct resource tmu3_resources[] = { | ||
236 | [0] = { | ||
237 | .name = "TMU3", | ||
238 | .start = 0xffd90008, | ||
239 | .end = 0xffd90013, | ||
240 | .flags = IORESOURCE_MEM, | ||
241 | }, | ||
242 | [1] = { | ||
243 | .start = 57, | ||
244 | .flags = IORESOURCE_IRQ, | ||
245 | }, | ||
246 | }; | ||
247 | |||
248 | static struct platform_device tmu3_device = { | ||
249 | .name = "sh_tmu", | ||
250 | .id = 3, | ||
251 | .dev = { | ||
252 | .platform_data = &tmu3_platform_data, | ||
253 | }, | ||
254 | .resource = tmu3_resources, | ||
255 | .num_resources = ARRAY_SIZE(tmu3_resources), | ||
256 | }; | ||
257 | |||
258 | static struct sh_timer_config tmu4_platform_data = { | ||
259 | .name = "TMU4", | ||
260 | .channel_offset = 0x10, | ||
261 | .timer_bit = 1, | ||
262 | .clk = "tmu1", | ||
263 | }; | ||
264 | |||
265 | static struct resource tmu4_resources[] = { | ||
266 | [0] = { | ||
267 | .name = "TMU4", | ||
268 | .start = 0xffd90014, | ||
269 | .end = 0xffd9001f, | ||
270 | .flags = IORESOURCE_MEM, | ||
271 | }, | ||
272 | [1] = { | ||
273 | .start = 58, | ||
274 | .flags = IORESOURCE_IRQ, | ||
275 | }, | ||
276 | }; | ||
277 | |||
278 | static struct platform_device tmu4_device = { | ||
279 | .name = "sh_tmu", | ||
280 | .id = 4, | ||
281 | .dev = { | ||
282 | .platform_data = &tmu4_platform_data, | ||
283 | }, | ||
284 | .resource = tmu4_resources, | ||
285 | .num_resources = ARRAY_SIZE(tmu4_resources), | ||
286 | }; | ||
287 | |||
288 | static struct sh_timer_config tmu5_platform_data = { | ||
289 | .name = "TMU5", | ||
290 | .channel_offset = 0x1c, | ||
291 | .timer_bit = 2, | ||
292 | .clk = "tmu1", | ||
293 | }; | ||
294 | |||
295 | static struct resource tmu5_resources[] = { | ||
296 | [0] = { | ||
297 | .name = "TMU5", | ||
298 | .start = 0xffd90020, | ||
299 | .end = 0xffd9002b, | ||
300 | .flags = IORESOURCE_MEM, | ||
301 | }, | ||
302 | [1] = { | ||
303 | .start = 57, | ||
304 | .flags = IORESOURCE_IRQ, | ||
305 | }, | ||
306 | }; | ||
307 | |||
308 | static struct platform_device tmu5_device = { | ||
309 | .name = "sh_tmu", | ||
310 | .id = 5, | ||
311 | .dev = { | ||
312 | .platform_data = &tmu5_platform_data, | ||
313 | }, | ||
314 | .resource = tmu5_resources, | ||
315 | .num_resources = ARRAY_SIZE(tmu5_resources), | ||
316 | }; | ||
317 | |||
136 | static struct plat_sci_port sci_platform_data[] = { | 318 | static struct plat_sci_port sci_platform_data[] = { |
137 | { | 319 | { |
138 | .mapbase = 0xffe00000, | 320 | .mapbase = 0xffe00000, |
@@ -255,6 +437,12 @@ static struct platform_device iic_device = { | |||
255 | 437 | ||
256 | static struct platform_device *sh7723_devices[] __initdata = { | 438 | static struct platform_device *sh7723_devices[] __initdata = { |
257 | &cmt_device, | 439 | &cmt_device, |
440 | &tmu0_device, | ||
441 | &tmu1_device, | ||
442 | &tmu2_device, | ||
443 | &tmu3_device, | ||
444 | &tmu4_device, | ||
445 | &tmu5_device, | ||
258 | &sci_device, | 446 | &sci_device, |
259 | &rtc_device, | 447 | &rtc_device, |
260 | &iic_device, | 448 | &iic_device, |
@@ -282,6 +470,12 @@ __initcall(sh7723_devices_setup); | |||
282 | 470 | ||
283 | static struct platform_device *sh7723_early_devices[] __initdata = { | 471 | static struct platform_device *sh7723_early_devices[] __initdata = { |
284 | &cmt_device, | 472 | &cmt_device, |
473 | &tmu0_device, | ||
474 | &tmu1_device, | ||
475 | &tmu2_device, | ||
476 | &tmu3_device, | ||
477 | &tmu4_device, | ||
478 | &tmu5_device, | ||
285 | }; | 479 | }; |
286 | 480 | ||
287 | void __init plat_early_device_setup(void) | 481 | void __init plat_early_device_setup(void) |