* [PATCH] clocksource: arm_global_timer: register delay timer @ 2015-08-19 13:43 Rabin Vincent 2015-08-20 19:03 ` Daniel Lezcano 0 siblings, 1 reply; 4+ messages in thread From: Rabin Vincent @ 2015-08-19 13:43 UTC (permalink / raw) To: linux-arm-kernel Provide a delay timer using the lower 32-bits of the global timer so that we can use that instead of having to calibrating delays. Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> --- drivers/clocksource/arm_global_timer.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c index e683377..f92a77d 100644 --- a/drivers/clocksource/arm_global_timer.c +++ b/drivers/clocksource/arm_global_timer.c @@ -16,6 +16,7 @@ #include <linux/clockchips.h> #include <linux/cpu.h> #include <linux/clk.h> +#include <linux/delay.h> #include <linux/err.h> #include <linux/io.h> #include <linux/of.h> @@ -208,6 +209,21 @@ static u64 notrace gt_sched_clock_read(void) } #endif +static unsigned long gt_read_long(void) +{ + return readl_relaxed(gt_base + GT_COUNTER0); +} + +static struct delay_timer gt_delay_timer = { + .read_current_timer = gt_read_long, +}; + +static void __init gt_delay_timer_init(void) +{ + gt_delay_timer.freq = gt_clk_rate; + register_current_timer_delay(>_delay_timer); +} + static void __init gt_clocksource_init(void) { writel(0, gt_base + GT_CONTROL); @@ -304,6 +320,7 @@ static void __init global_timer_of_register(struct device_node *np) /* Immediately configure the timer on the boot CPU */ gt_clocksource_init(); gt_clockevents_init(this_cpu_ptr(gt_evt)); + gt_delay_timer_init(); return; -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] clocksource: arm_global_timer: register delay timer 2015-08-19 13:43 [PATCH] clocksource: arm_global_timer: register delay timer Rabin Vincent @ 2015-08-20 19:03 ` Daniel Lezcano 2016-02-16 11:28 ` Rabin Vincent 0 siblings, 1 reply; 4+ messages in thread From: Daniel Lezcano @ 2015-08-20 19:03 UTC (permalink / raw) To: linux-arm-kernel On 08/19/2015 03:43 PM, Rabin Vincent wrote: > Provide a delay timer using the lower 32-bits of the global timer so > that we can use that instead of having to calibrating delays. > > Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> Applied to my tree for 4.4 Thanks ! -- Daniel -- <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] clocksource: arm_global_timer: register delay timer 2015-08-20 19:03 ` Daniel Lezcano @ 2016-02-16 11:28 ` Rabin Vincent 2016-02-16 11:42 ` Daniel Lezcano 0 siblings, 1 reply; 4+ messages in thread From: Rabin Vincent @ 2016-02-16 11:28 UTC (permalink / raw) To: linux-arm-kernel On Thu, Aug 20, 2015 at 09:03:04PM +0200, Daniel Lezcano wrote: > On 08/19/2015 03:43 PM, Rabin Vincent wrote: > > Provide a delay timer using the lower 32-bits of the global timer so > > that we can use that instead of having to calibrating delays. > > > > Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> > > Applied to my tree for 4.4 This seems to have got lost? I don't see it in v4.4 or current mainline (v4.5-rc4). It still applies cleanly. Thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] clocksource: arm_global_timer: register delay timer 2016-02-16 11:28 ` Rabin Vincent @ 2016-02-16 11:42 ` Daniel Lezcano 0 siblings, 0 replies; 4+ messages in thread From: Daniel Lezcano @ 2016-02-16 11:42 UTC (permalink / raw) To: linux-arm-kernel On 02/16/2016 11:28 AM, Rabin Vincent wrote: > On Thu, Aug 20, 2015 at 09:03:04PM +0200, Daniel Lezcano wrote: >> On 08/19/2015 03:43 PM, Rabin Vincent wrote: >>> Provide a delay timer using the lower 32-bits of the global timer so >>> that we can use that instead of having to calibrating delays. >>> >>> Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> >> >> Applied to my tree for 4.4 > > This seems to have got lost? I don't see it in v4.4 or current mainline > (v4.5-rc4). It still applies cleanly. Oops, right. Fixed now [1]. Thanks for the heads up. -- Daniel [1] https://git.linaro.org/people/daniel.lezcano/linux.git/commit/23cb25d0f407e83be10747258092843e8e20d535 -- <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-16 11:42 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-08-19 13:43 [PATCH] clocksource: arm_global_timer: register delay timer Rabin Vincent 2015-08-20 19:03 ` Daniel Lezcano 2016-02-16 11:28 ` Rabin Vincent 2016-02-16 11:42 ` Daniel Lezcano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).