aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-r8a7779.c
diff options
context:
space:
mode:
authorSimon Horman <horms+renesas@verge.net.au>2013-02-18 20:53:05 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-03-12 13:13:20 -0400
commit916ddc355f061b636a71ee5e1d0eb977ee8a6938 (patch)
tree77b7267bdae1098dbed3913939a4438e643eaaaa /arch/arm/mach-shmobile/setup-r8a7779.c
parent3b00f9342623a5ebc19bea663199864252bf3e93 (diff)
ARM: shmobile: r8a7779: Do not use early devices with DT reference
Do not initialise any early devices when using the minimal DT reference code. Only the delay needs to be initialised. Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7779.c')
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 922dd4db21a0..b1f7a45b56b9 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -322,7 +322,7 @@ static struct platform_device i2c3_device = {
322 .num_resources = ARRAY_SIZE(rcar_i2c3_res), 322 .num_resources = ARRAY_SIZE(rcar_i2c3_res),
323}; 323};
324 324
325static struct platform_device *r8a7779_early_devices_dt[] __initdata = { 325static struct platform_device *r8a7779_devices_dt[] __initdata = {
326 &scif0_device, 326 &scif0_device,
327 &scif1_device, 327 &scif1_device,
328 &scif2_device, 328 &scif2_device,
@@ -350,8 +350,8 @@ void __init r8a7779_add_standard_devices(void)
350 350
351 r8a7779_init_pm_domains(); 351 r8a7779_init_pm_domains();
352 352
353 platform_add_devices(r8a7779_early_devices_dt, 353 platform_add_devices(r8a7779_devices_dt,
354 ARRAY_SIZE(r8a7779_early_devices_dt)); 354 ARRAY_SIZE(r8a7779_devices_dt));
355 platform_add_devices(r8a7779_early_devices, 355 platform_add_devices(r8a7779_early_devices,
356 ARRAY_SIZE(r8a7779_early_devices)); 356 ARRAY_SIZE(r8a7779_early_devices));
357} 357}
@@ -368,8 +368,8 @@ void __init r8a7779_earlytimer_init(void)
368 368
369void __init r8a7779_add_early_devices(void) 369void __init r8a7779_add_early_devices(void)
370{ 370{
371 early_platform_add_devices(r8a7779_early_devices_dt, 371 early_platform_add_devices(r8a7779_devices_dt,
372 ARRAY_SIZE(r8a7779_early_devices_dt)); 372 ARRAY_SIZE(r8a7779_devices_dt));
373 early_platform_add_devices(r8a7779_early_devices, 373 early_platform_add_devices(r8a7779_early_devices,
374 ARRAY_SIZE(r8a7779_early_devices)); 374 ARRAY_SIZE(r8a7779_early_devices));
375 375
@@ -391,16 +391,9 @@ void __init r8a7779_add_early_devices(void)
391} 391}
392 392
393#ifdef CONFIG_USE_OF 393#ifdef CONFIG_USE_OF
394void __init r8a7779_add_early_devices_dt(void) 394void __init r8a7779_init_delay(void)
395{ 395{
396 shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ 396 shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
397
398 early_platform_add_devices(r8a7779_early_devices_dt,
399 ARRAY_SIZE(r8a7779_early_devices_dt));
400
401 /* Early serial console setup is not included here.
402 * See comment in r8a7779_add_early_devices().
403 */
404} 397}
405 398
406static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = { 399static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = {
@@ -412,8 +405,8 @@ void __init r8a7779_add_standard_devices_dt(void)
412 /* clocks are setup late during boot in the case of DT */ 405 /* clocks are setup late during boot in the case of DT */
413 r8a7779_clock_init(); 406 r8a7779_clock_init();
414 407
415 platform_add_devices(r8a7779_early_devices_dt, 408 platform_add_devices(r8a7779_devices_dt,
416 ARRAY_SIZE(r8a7779_early_devices_dt)); 409 ARRAY_SIZE(r8a7779_devices_dt));
417 of_platform_populate(NULL, of_default_bus_match_table, 410 of_platform_populate(NULL, of_default_bus_match_table,
418 r8a7779_auxdata_lookup, NULL); 411 r8a7779_auxdata_lookup, NULL);
419} 412}
@@ -425,7 +418,7 @@ static const char *r8a7779_compat_dt[] __initdata = {
425 418
426DT_MACHINE_START(SH73A0_DT, "Generic R8A7779 (Flattened Device Tree)") 419DT_MACHINE_START(SH73A0_DT, "Generic R8A7779 (Flattened Device Tree)")
427 .map_io = r8a7779_map_io, 420 .map_io = r8a7779_map_io,
428 .init_early = r8a7779_add_early_devices_dt, 421 .init_early = r8a7779_init_delay,
429 .nr_irqs = NR_IRQS_LEGACY, 422 .nr_irqs = NR_IRQS_LEGACY,
430 .init_irq = r8a7779_init_irq_dt, 423 .init_irq = r8a7779_init_irq_dt,
431 .init_machine = r8a7779_add_standard_devices_dt, 424 .init_machine = r8a7779_add_standard_devices_dt,