From 08ad42fb7702ee2968b5b837e245ca8fd2175223 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 6 Mar 2012 17:36:14 +0900 Subject: ARM: mach-shmobile: add shmobile_earlytimer_init() Add shmobile_earlytimer_init() that can be used to enable the earlytimer probing from the SoC code. Signed-off-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/timer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-shmobile/timer.c') diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 895794b543cd..e51064343553 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c @@ -36,11 +36,16 @@ static void __init shmobile_late_time_init(void) early_platform_driver_probe("earlytimer", 2, 0); } -static void __init shmobile_timer_init(void) +void __init shmobile_earlytimer_init(void) { late_time_init = shmobile_late_time_init; } +static void __init shmobile_timer_init(void) +{ + shmobile_earlytimer_init(); +} + struct sys_timer shmobile_timer = { .init = shmobile_timer_init, }; -- cgit v1.2.3 From 2854903ad1329d09d7ec35639fff0949e45d496d Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 6 Mar 2012 17:37:09 +0900 Subject: ARM: mach-shmobile: default to no earlytimer Now when all SoCs and boards are converted to use shmobile_earlytimer_init(), change the default behavior of shmobile_timer.init() from using early timer to do nothing which is suitable for upcoming DT support. Signed-off-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/timer.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-shmobile/timer.c') diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index e51064343553..be1ad70fe404 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c @@ -43,7 +43,6 @@ void __init shmobile_earlytimer_init(void) static void __init shmobile_timer_init(void) { - shmobile_earlytimer_init(); } struct sys_timer shmobile_timer = { -- cgit v1.2.3 From 4200b16d58cd34ff8e1616d8ed77417f8fc44864 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Tue, 10 Jan 2012 19:44:19 +0000 Subject: ARM: shmobile: convert to twd_local_timer_register() interface Add support for the new smp_twd runtime registration interface to the shmobile platforms, and remove the old compile-time support. Cc: Magnus Damm Cc: Paul Mundt Signed-off-by: Marc Zyngier --- arch/arm/mach-shmobile/timer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-shmobile/timer.c') diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 895794b543cd..be16231e86fc 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c @@ -20,6 +20,7 @@ */ #include #include +#include static void __init shmobile_late_time_init(void) { @@ -41,6 +42,15 @@ static void __init shmobile_timer_init(void) late_time_init = shmobile_late_time_init; } +void __init shmobile_twd_init(struct twd_local_timer *twd_local_timer) +{ +#ifdef CONFIG_HAVE_ARM_TWD + int err = twd_local_timer_register(twd_local_timer); + if (err) + pr_err("twd_local_timer_register failed %d\n", err); +#endif +} + struct sys_timer shmobile_timer = { .init = shmobile_timer_init, }; -- cgit v1.2.3