[PATCH V3 3/5] ARM: bcm2708: add system timer
From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-09-12 10:40:32
On Wednesday 12 September 2012, Stephen Warren wrote:
From: Simon Arlott <redacted> The System Timer peripheral provides four 32-bit timer channels and a single 64-bit free running counter. Each channel has an output compare register, which is compared against the 32 least significant bits of the free running counter values, and generates an interrupt. Timer 3 is used as the Linux timer. The BCM2708 also contains an SP804-based timer module. However, it apparently has significant differences from the standard SP804 IP block, and Broadcom's documentation recommends using the system timer instead. This patch was extracted from git://github.com/lp0/linux.git branch rpi-split as of 2012/09/08, and modified as follows: * Moved struct sys_timer bcm2708_timer into time.c to encapsulate it more. * Added DT binding docs. * Moved to drivers/clocksource/. This looks like the desired location for such code now. * Simplified bcm2708_time_init() to find one matching node and operate on it, rather than looping over all matching nodes. This seems more consistent with other clocksource code. * Renamed struct bcm2708_timer.index to match_mask to better represent its purpose. * s/printk(PR_INFO/pr_info(/ Signed-off-by: Chris Boot <bootc@bootc.net> Signed-off-by: Simon Arlott <redacted> Signed-off-by: Dom Cobley <redacted> Signed-off-by: Dom Cobley <redacted> Signed-off-by: Stephen Warren <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de> Looks good to me, but I think the use of of_iomap() would be a good simplification of the init function. Arnd