From b22cceaadfc4fef7d8cd4b033b42810a4e76e640 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 6 Mar 2012 17:36:53 +0900 Subject: [PATCH] --- yaml --- r: 295798 b: refs/heads/master c: 23e5bc03e3b07185d61c212bf39aaf126cc958e3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-shmobile/board-bonito.c | 18 +++++++++++------- trunk/arch/arm/mach-shmobile/setup-r8a7740.c | 10 ++++++++++ 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 2dc332c95239..ef87cef3c4a2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3be26fdba82a2ae8ed568ab5d4a0a2e252f18b13 +refs/heads/master: 23e5bc03e3b07185d61c212bf39aaf126cc958e3 diff --git a/trunk/arch/arm/mach-shmobile/board-bonito.c b/trunk/arch/arm/mach-shmobile/board-bonito.c index e39fa08731bf..d062becd5460 100644 --- a/trunk/arch/arm/mach-shmobile/board-bonito.c +++ b/trunk/arch/arm/mach-shmobile/board-bonito.c @@ -466,7 +466,7 @@ static void __init bonito_init(void) } } -static void __init bonito_timer_init(void) +static void __init bonito_earlytimer_init(void) { u16 val; u8 md_ck = 0; @@ -481,18 +481,22 @@ static void __init bonito_timer_init(void) md_ck |= MD_CK0; r8a7740_clock_init(md_ck); - shmobile_timer.init(); + shmobile_earlytimer_init(); } -struct sys_timer bonito_timer = { - .init = bonito_timer_init, -}; +void __init bonito_add_early_devices(void) +{ + r8a7740_add_early_devices(); + + /* override timer setup with board-specific code */ + shmobile_timer.init = bonito_earlytimer_init; +} MACHINE_START(BONITO, "bonito") .map_io = bonito_map_io, - .init_early = r8a7740_add_early_devices, + .init_early = bonito_add_early_devices, .init_irq = r8a7740_init_irq, .handle_irq = shmobile_handle_irq_intc, .init_machine = bonito_init, - .timer = &bonito_timer, + .timer = &shmobile_timer, MACHINE_END diff --git a/trunk/arch/arm/mach-shmobile/setup-r8a7740.c b/trunk/arch/arm/mach-shmobile/setup-r8a7740.c index dbc30670a27f..74e52341dd1b 100644 --- a/trunk/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/trunk/arch/arm/mach-shmobile/setup-r8a7740.c @@ -29,6 +29,7 @@ #include #include #include +#include static struct map_desc r8a7740_io_desc[] __initdata = { /* @@ -377,6 +378,12 @@ void __init r8a7740_add_standard_devices(void) ARRAY_SIZE(r8a7740_late_devices)); } +static void __init r8a7740_earlytimer_init(void) +{ + r8a7740_clock_init(0); + shmobile_earlytimer_init(); +} + void __init r8a7740_add_early_devices(void) { early_platform_add_devices(r8a7740_early_devices, @@ -384,4 +391,7 @@ void __init r8a7740_add_early_devices(void) /* setup early console here as well */ shmobile_setup_console(); + + /* override timer setup with soc-specific code */ + shmobile_timer.init = r8a7740_earlytimer_init; }