aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-spear/time.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-01-14ARM: use clockevents_config_and_register() where possibleShawn Guo1-7/+1
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-05-14Merge branch 'spear/dt' into spear/clockArnd Bergmann1-14/+26
Conflicts: arch/arm/mach-spear3xx/clock.c arch/arm/mach-spear3xx/include/mach/generic.h arch/arm/mach-spear3xx/include/mach/misc_regs.h arch/arm/mach-spear3xx/spear320.c arch/arm/mach-spear6xx/clock.c arch/arm/mach-spear6xx/include/mach/misc_regs.h Resolve even more merge conflicts. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-12SPEAr: Call clk_prepare() before calling clk_enableViresh Kumar1-4/+4
With common clock framework, it is must to call clk_{un}prepare() before/after clk_{dis}enable. This patch fixes this for SPEAr timer. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Reviewed-by: Mike Turquette <mturquette@linaro.org>
2012-05-12SPEAr: Add DT bindings for SPEAr's timerViresh Kumar1-9/+22
All SPEAr SoC's use ST's Timer module. This patch adds device tree probing capability for that. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-04-22ARM: spear: remove most mach/*.h header contentsArnd Bergmann1-9/+8
The register and irq definitions in mach/*.h for spear3xx and spear6xx are now mostly obsolete, after the platforms have been converted to device tree based probing and the data is now part of the device tree files. The misc_regs.h contents are moved into clock.c because that is the only user, aside from the DMA_CHN_CFG that should eventually get handled differently. Some of the contents of mach/spear.h still remain, because they are used to set up the static map table, timer, uart and auxdata tables, but almost everything got removed. We might remove everything but the map table as the DT conversion completes, but that is not a priority. I've also made sure to make both copies of spear.h more or less identical so we can eventually combine them. The spear3?0.h files were only used by the spear3?0.c files, so I merged the contents in there and removed the bits that were unused. This is something that should still be looked at. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Viresh Kumar <viresh.kumar@st.com>
2012-02-27ARM: 7348/1: arm/spear600: fix one-shot timerGilles Chanteperdrix1-2/+4
Currently, the "clockevent_next_event" function only works correctly if the timer is not running when this function is called, which is not always the case when running with CONFIG_HIGH_RES_TIMERS. Fix this by stopping the timer at the beginning of this function. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Acked-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert SPEAr platforms 16-bit up counting clocksourceRussell King1-14/+2
Convert SPEAr platforms 16-bit up counting clocksource, which requires a 16-bit register access read rather than 32-bit. Acked-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-09ARM: 6788/1: SPEAr: Include mach/hardware.h instead of mach/spear.hviresh kumar1-1/+0
This patch makes inclusion of hardware.h and spear.h consistent over all spear variants. Now we will include hardware.h, wherever we need to use hardware macros. spear.h will be automatically included by hardware.h Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-09ARM: 6787/1: SPEAr: Reorder #includes in .h & .c files.viresh kumar1-2/+2
Order of inclusion of .h files must be: <linux/...>, <asm/...>, <plat/...>, <mach/...>. This patch corrects this ordering whereever it is not followed. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-09ARM: 6737/1: SPEAr: formalized timer supportShiraz Hashim1-13/+8
Move platform specific timer initialization code is moved into platform specific files. Reviewed-by: Jamie Iles <jamie@jamieiles.com> Reviewed-by: Stanley Miao <stanley.miao@windriver.com> Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-22ARM: spear: update clock source registrationRussell King1-5/+1
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new interfaces were added which simplify (and optimize) the selection of the divisor shift/mult constants. Switch over to using this new interface. Acked-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-22ARM: 6234/1: move SPEAr to use common mult/shift calculation codeLinus Walleij1-40/+7
Since the infrastructure for determining shift/mult values from a clock rate and a minimum programmable rate is now in the kernel, lets remove this custom code. Cc: Viresh KUMAR <viresh.kumar@st.com> Tested-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-14ARM: 6013/1: ST SPEAr: Added source files for SPEAr platformviresh kumar1-0/+292
Reviewed-by: Linus Walleij <linux.walleij@stericsson.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>