diff options
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7740.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 133 |
1 files changed, 25 insertions, 108 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 8f3c68101d59..b7a09bb45fc9 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -237,126 +237,45 @@ R8A7740_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(107)); | |||
237 | R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108)); | 237 | R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108)); |
238 | 238 | ||
239 | /* CMT */ | 239 | /* CMT */ |
240 | static struct sh_timer_config cmt10_platform_data = { | 240 | static struct sh_timer_config cmt1_platform_data = { |
241 | .name = "CMT10", | 241 | .channels_mask = 0x3f, |
242 | .channel_offset = 0x10, | ||
243 | .timer_bit = 0, | ||
244 | .clockevent_rating = 125, | ||
245 | .clocksource_rating = 125, | ||
246 | }; | 242 | }; |
247 | 243 | ||
248 | static struct resource cmt10_resources[] = { | 244 | static struct resource cmt1_resources[] = { |
249 | [0] = { | 245 | DEFINE_RES_MEM(0xe6138000, 0x170), |
250 | .name = "CMT10", | 246 | DEFINE_RES_IRQ(gic_spi(58)), |
251 | .start = 0xe6138010, | ||
252 | .end = 0xe613801b, | ||
253 | .flags = IORESOURCE_MEM, | ||
254 | }, | ||
255 | [1] = { | ||
256 | .start = gic_spi(58), | ||
257 | .flags = IORESOURCE_IRQ, | ||
258 | }, | ||
259 | }; | 247 | }; |
260 | 248 | ||
261 | static struct platform_device cmt10_device = { | 249 | static struct platform_device cmt1_device = { |
262 | .name = "sh_cmt", | 250 | .name = "sh-cmt-48", |
263 | .id = 10, | 251 | .id = 1, |
264 | .dev = { | 252 | .dev = { |
265 | .platform_data = &cmt10_platform_data, | 253 | .platform_data = &cmt1_platform_data, |
266 | }, | 254 | }, |
267 | .resource = cmt10_resources, | 255 | .resource = cmt1_resources, |
268 | .num_resources = ARRAY_SIZE(cmt10_resources), | 256 | .num_resources = ARRAY_SIZE(cmt1_resources), |
269 | }; | 257 | }; |
270 | 258 | ||
271 | /* TMU */ | 259 | /* TMU */ |
272 | static struct sh_timer_config tmu00_platform_data = { | 260 | static struct sh_timer_config tmu0_platform_data = { |
273 | .name = "TMU00", | 261 | .channels_mask = 7, |
274 | .channel_offset = 0x4, | ||
275 | .timer_bit = 0, | ||
276 | .clockevent_rating = 200, | ||
277 | }; | 262 | }; |
278 | 263 | ||
279 | static struct resource tmu00_resources[] = { | 264 | static struct resource tmu0_resources[] = { |
280 | [0] = { | 265 | DEFINE_RES_MEM(0xfff80000, 0x2c), |
281 | .name = "TMU00", | 266 | DEFINE_RES_IRQ(gic_spi(198)), |
282 | .start = 0xfff80008, | 267 | DEFINE_RES_IRQ(gic_spi(199)), |
283 | .end = 0xfff80014 - 1, | 268 | DEFINE_RES_IRQ(gic_spi(200)), |
284 | .flags = IORESOURCE_MEM, | ||
285 | }, | ||
286 | [1] = { | ||
287 | .start = gic_spi(198), | ||
288 | .flags = IORESOURCE_IRQ, | ||
289 | }, | ||
290 | }; | 269 | }; |
291 | 270 | ||
292 | static struct platform_device tmu00_device = { | 271 | static struct platform_device tmu0_device = { |
293 | .name = "sh_tmu", | 272 | .name = "sh-tmu", |
294 | .id = 0, | 273 | .id = 0, |
295 | .dev = { | 274 | .dev = { |
296 | .platform_data = &tmu00_platform_data, | 275 | .platform_data = &tmu0_platform_data, |
297 | }, | ||
298 | .resource = tmu00_resources, | ||
299 | .num_resources = ARRAY_SIZE(tmu00_resources), | ||
300 | }; | ||
301 | |||
302 | static struct sh_timer_config tmu01_platform_data = { | ||
303 | .name = "TMU01", | ||
304 | .channel_offset = 0x10, | ||
305 | .timer_bit = 1, | ||
306 | .clocksource_rating = 200, | ||
307 | }; | ||
308 | |||
309 | static struct resource tmu01_resources[] = { | ||
310 | [0] = { | ||
311 | .name = "TMU01", | ||
312 | .start = 0xfff80014, | ||
313 | .end = 0xfff80020 - 1, | ||
314 | .flags = IORESOURCE_MEM, | ||
315 | }, | ||
316 | [1] = { | ||
317 | .start = gic_spi(199), | ||
318 | .flags = IORESOURCE_IRQ, | ||
319 | }, | ||
320 | }; | ||
321 | |||
322 | static struct platform_device tmu01_device = { | ||
323 | .name = "sh_tmu", | ||
324 | .id = 1, | ||
325 | .dev = { | ||
326 | .platform_data = &tmu01_platform_data, | ||
327 | }, | ||
328 | .resource = tmu01_resources, | ||
329 | .num_resources = ARRAY_SIZE(tmu01_resources), | ||
330 | }; | ||
331 | |||
332 | static struct sh_timer_config tmu02_platform_data = { | ||
333 | .name = "TMU02", | ||
334 | .channel_offset = 0x1C, | ||
335 | .timer_bit = 2, | ||
336 | .clocksource_rating = 200, | ||
337 | }; | ||
338 | |||
339 | static struct resource tmu02_resources[] = { | ||
340 | [0] = { | ||
341 | .name = "TMU02", | ||
342 | .start = 0xfff80020, | ||
343 | .end = 0xfff8002C - 1, | ||
344 | .flags = IORESOURCE_MEM, | ||
345 | }, | ||
346 | [1] = { | ||
347 | .start = gic_spi(200), | ||
348 | .flags = IORESOURCE_IRQ, | ||
349 | }, | ||
350 | }; | ||
351 | |||
352 | static struct platform_device tmu02_device = { | ||
353 | .name = "sh_tmu", | ||
354 | .id = 2, | ||
355 | .dev = { | ||
356 | .platform_data = &tmu02_platform_data, | ||
357 | }, | 276 | }, |
358 | .resource = tmu02_resources, | 277 | .resource = tmu0_resources, |
359 | .num_resources = ARRAY_SIZE(tmu02_resources), | 278 | .num_resources = ARRAY_SIZE(tmu0_resources), |
360 | }; | 279 | }; |
361 | 280 | ||
362 | /* IPMMUI (an IPMMU module for ICB/LMB) */ | 281 | /* IPMMUI (an IPMMU module for ICB/LMB) */ |
@@ -400,7 +319,7 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = { | |||
400 | &scif6_device, | 319 | &scif6_device, |
401 | &scif7_device, | 320 | &scif7_device, |
402 | &scif8_device, | 321 | &scif8_device, |
403 | &cmt10_device, | 322 | &cmt1_device, |
404 | }; | 323 | }; |
405 | 324 | ||
406 | static struct platform_device *r8a7740_early_devices[] __initdata = { | 325 | static struct platform_device *r8a7740_early_devices[] __initdata = { |
@@ -408,9 +327,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { | |||
408 | &irqpin1_device, | 327 | &irqpin1_device, |
409 | &irqpin2_device, | 328 | &irqpin2_device, |
410 | &irqpin3_device, | 329 | &irqpin3_device, |
411 | &tmu00_device, | 330 | &tmu0_device, |
412 | &tmu01_device, | ||
413 | &tmu02_device, | ||
414 | &ipmmu_device, | 331 | &ipmmu_device, |
415 | }; | 332 | }; |
416 | 333 | ||