summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/timer.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: mxs: decrease mxs_clockevent_device.min_delta_ns to 2 clock cyclesTorben Hohn2013-02-051-1/+2
| | | | | Signed-off-by: Torben Hohn <torbenh@linutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
* ARM: mxs: use apbx bus clock to drive the timers on timrotv2Torben Hohn2013-02-051-4/+5
| | | | | | | | | | | | | 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>
* ARM: use clockevents_config_and_register() where possibleShawn Guo2013-01-141-19/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: mxs: Setup scheduler clockStanislav Meduna2012-11-121-1/+9
| | | | | | | | | | | | 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>
* ARM: mxs: retrieve timer irq from device treeShawn Guo2012-09-031-1/+12
| | | | | | | 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>
* ARM: mxs: remove now unused timer_clk argument from mxs_timer_initShawn Guo2012-05-091-7/+7
| | | | | | | 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>
* ARM: mxs: request clock for timerShawn Guo2012-05-091-0/+9
| | | | | | | 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>
* ARM: mxs: convert platform code to clk_prepare/clk_unprepareShawn Guo2011-12-281-1/+1
| | | | | | | | 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>
* clocksource: convert MXS timrotv2 to 32-bit down counting clocksourceRussell King2011-05-231-13/+7
| | | | | | | | | 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>
* ARM: mxs: Add timer supportShawn Guo2010-12-201-0/+296
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>
OpenPOWER on IntegriCloud