diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-bonito.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 10 |
2 files changed, 21 insertions, 7 deletions
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c index e39fa08731bf..d062becd5460 100644 --- a/arch/arm/mach-shmobile/board-bonito.c +++ b/arch/arm/mach-shmobile/board-bonito.c | |||
@@ -466,7 +466,7 @@ static void __init bonito_init(void) | |||
466 | } | 466 | } |
467 | } | 467 | } |
468 | 468 | ||
469 | static void __init bonito_timer_init(void) | 469 | static void __init bonito_earlytimer_init(void) |
470 | { | 470 | { |
471 | u16 val; | 471 | u16 val; |
472 | u8 md_ck = 0; | 472 | u8 md_ck = 0; |
@@ -481,18 +481,22 @@ static void __init bonito_timer_init(void) | |||
481 | md_ck |= MD_CK0; | 481 | md_ck |= MD_CK0; |
482 | 482 | ||
483 | r8a7740_clock_init(md_ck); | 483 | r8a7740_clock_init(md_ck); |
484 | shmobile_timer.init(); | 484 | shmobile_earlytimer_init(); |
485 | } | 485 | } |
486 | 486 | ||
487 | struct sys_timer bonito_timer = { | 487 | void __init bonito_add_early_devices(void) |
488 | .init = bonito_timer_init, | 488 | { |
489 | }; | 489 | r8a7740_add_early_devices(); |
490 | |||
491 | /* override timer setup with board-specific code */ | ||
492 | shmobile_timer.init = bonito_earlytimer_init; | ||
493 | } | ||
490 | 494 | ||
491 | MACHINE_START(BONITO, "bonito") | 495 | MACHINE_START(BONITO, "bonito") |
492 | .map_io = bonito_map_io, | 496 | .map_io = bonito_map_io, |
493 | .init_early = r8a7740_add_early_devices, | 497 | .init_early = bonito_add_early_devices, |
494 | .init_irq = r8a7740_init_irq, | 498 | .init_irq = r8a7740_init_irq, |
495 | .handle_irq = shmobile_handle_irq_intc, | 499 | .handle_irq = shmobile_handle_irq_intc, |
496 | .init_machine = bonito_init, | 500 | .init_machine = bonito_init, |
497 | .timer = &bonito_timer, | 501 | .timer = &shmobile_timer, |
498 | MACHINE_END | 502 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index dbc30670a27f..74e52341dd1b 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | ||
32 | 33 | ||
33 | static struct map_desc r8a7740_io_desc[] __initdata = { | 34 | static struct map_desc r8a7740_io_desc[] __initdata = { |
34 | /* | 35 | /* |
@@ -377,6 +378,12 @@ void __init r8a7740_add_standard_devices(void) | |||
377 | ARRAY_SIZE(r8a7740_late_devices)); | 378 | ARRAY_SIZE(r8a7740_late_devices)); |
378 | } | 379 | } |
379 | 380 | ||
381 | static void __init r8a7740_earlytimer_init(void) | ||
382 | { | ||
383 | r8a7740_clock_init(0); | ||
384 | shmobile_earlytimer_init(); | ||
385 | } | ||
386 | |||
380 | void __init r8a7740_add_early_devices(void) | 387 | void __init r8a7740_add_early_devices(void) |
381 | { | 388 | { |
382 | early_platform_add_devices(r8a7740_early_devices, | 389 | early_platform_add_devices(r8a7740_early_devices, |
@@ -384,4 +391,7 @@ void __init r8a7740_add_early_devices(void) | |||
384 | 391 | ||
385 | /* setup early console here as well */ | 392 | /* setup early console here as well */ |
386 | shmobile_setup_console(); | 393 | shmobile_setup_console(); |
394 | |||
395 | /* override timer setup with soc-specific code */ | ||
396 | shmobile_timer.init = r8a7740_earlytimer_init; | ||
387 | } | 397 | } |