aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-mxs/timer.c
AgeCommit message (Collapse)Author
2013-04-01ARM: mxs: move timer driver into drivers/clocksourceShawn Guo
Move mxs timer driver into drivers/clocksource as mxs_timer.c. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01ARM: mxs: select STMP_DEVICE and use it for timer codeShawn Guo
Select STMP_DEVICE and in timer code replace mxs_reset_block() with stmp_reset_block(), use STMP_OFFSET_REG_SET/CLR to replace __mxs_setl/clrl. As the result, <mach/mxs.h> and <mach/common.h> includsion can be removed from timer.c now. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01ARM: mxs: remove cpu_is_mx23() call from timer codeShawn Guo
Remove cpu_is_mx23() call from timer code by using of_device_is_compatible() instead. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01ARM: mxs: get timrot base address from device treeShawn Guo
Instead of using static defines, it gets timrot base address with mapping from device tree. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01ARM: mxs: look up timrot clock from device treeShawn Guo
Change call clk_get_sys() to of_clk_get() to look up timrot clock from device tree, so that the clk_register_clkdev() call for timrot can be saved in clock driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01ARM: mxs: use CLKSRC_OF helper to initialize timerShawn Guo
Select CLKSRC_OF and use clocksource_of_init() to initialize timer, so that the call to mxs_timer_init() in clock driver can be removed. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-02-05ARM: mxs: decrease mxs_clockevent_device.min_delta_ns to 2 clock cyclesTorben Hohn
Signed-off-by: Torben Hohn <torbenh@linutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-02-05ARM: mxs: use apbx bus clock to drive the timers on timrotv2Torben Hohn
timer resolution of ~32us is pretty low. v2 has 32bits resolution, so we have quite some headroom, and can use the 24MHz clock. v1 has only 16bits, so we only increase v2. So we just exchange the timrot clock in imx28. On imx23 we have timrotv1 and everything stays the same. Signed-off-by: Torben Hohn <torbenh@linutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-01-14ARM: use clockevents_config_and_register() where possibleShawn Guo
The clockevent core is able to figure out the best mult and shift, calculate min_delta_ns and max_delta_ns, with the necessary info passed into clockevents_config_and_register(). Use this combined configure and register function where possible to make the codes less error prone and gain some positive diff stat. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Tested-by: Roland Stigge <stigge@antcom.de> Acked-by: Eric Miao <eric.y.miao@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: David Brown <davidb@codeaurora.org> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Barry Song <baohua.song@csr.com> Tested-by: Stephen Warren <swarren@nvidia.com> Acked-by: Tony Prisk <linux@prisktech.co.nz> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jason Cooper <jason@lakedaemon.net> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-11-12ARM: mxs: Setup scheduler clockStanislav Meduna
Setup scheduler clock on ARM MXS platforms with a 32-bit timrot such as i.MX28. This allows the scheduler to use sub-jiffy resolution. The corresponding change for 16-bit v1 timrots is not possible at the moment due to rounding issues with clock values wrapping faster than once per several seconds in the common ARM platform code. Signed-off-by: Stanislav Meduna <stano@meduna.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-09-03ARM: mxs: retrieve timer irq from device treeShawn Guo
Rather than using the static timer irq definition, we should retrieve timer irq from device tree for better. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-05-09ARM: mxs: remove now unused timer_clk argument from mxs_timer_initShawn Guo
With old mxs clock support removed, the timer_clk argument of mxs_timer_init is unused now, so remove it. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-05-09ARM: mxs: request clock for timerShawn Guo
When mxs_timer_init() does not have a timer_clk passed in, it should try to request clock from clkdev system. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2011-12-28ARM: mxs: convert platform code to clk_prepare/clk_unprepareShawn Guo
The patch converts mxs platform code to clk_prepare/clk_unprepare by using helper functions clk_prepare_enable/clk_disable_unprepare. Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2011-05-23clocksource: convert MXS timrotv2 to 32-bit down counting clocksourceRussell King
Convert the MXS timrotv2 32-bit down counting clocksource to the generic clocksource infrastructure. Cc: Sascha Hauer <kernel@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-20ARM: mxs: Add timer supportShawn Guo
There are 2 versions of the timrot on Freescale MXS-based SoCs. The v1 on MX23 only gets 16 bits counter, while v2 on MX28 extends the counter to 32 bits. The implementation uses two timers, one for clock_event and another for clocksource. MX28 uses timrot 0 and 1, while MX23 uses 0 and 2. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>