summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcm2835
diff options
context:
space:
mode:
authorSimon Arlott <simon@fire.lp0.eu>2012-09-10 22:38:35 -0600
committerStephen Warren <swarren@wwwdotorg.org>2012-09-19 19:08:46 -0600
commitee4af5696720bb5b9de2e3b18be42089bed1e638 (patch)
treedae604e551100648c6bf42a9b4de6a9ca2cd34b7 /arch/arm/mach-bcm2835
parent89214f009c1d38568456dcf997d93977928fe2c3 (diff)
downloadop-kernel-dev-ee4af5696720bb5b9de2e3b18be42089bed1e638.zip
op-kernel-dev-ee4af5696720bb5b9de2e3b18be42089bed1e638.tar.gz
ARM: bcm2835: add system timer
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 BCM2835 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: * s/bcm2708/bcm2835/. * Modified device tree vendor prefix. * Moved to drivers/clocksource/. This looks like the desired location for such code now. * Added DT binding docs. * Moved struct sys_timer bcm2835_timer into time.c to encapsulate it more. * Simplified bcm2835_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. * Simplified bcm2835_time_init() using of_iomap(). * Renamed struct bcm2835_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 <simon@fire.lp0.eu> Signed-off-by: Dom Cobley <popcornmix@gmail.com> Signed-off-by: Dom Cobley <dc4@broadcom.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-bcm2835')
-rw-r--r--arch/arm/mach-bcm2835/bcm2835.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index 72c4b5f..e3f2968 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -15,10 +15,10 @@
#include <linux/init.h>
#include <linux/irqchip/bcm2835.h>
#include <linux/of_platform.h>
+#include <linux/bcm2835_timer.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
-#include <asm/mach/time.h>
#include <mach/bcm2835_soc.h>
@@ -46,14 +46,6 @@ void __init bcm2835_init(void)
}
}
-static void __init bcm2835_timer_init(void)
-{
-}
-
-struct sys_timer bcm2835_timer = {
- .init = bcm2835_timer_init
-};
-
static const char * const bcm2835_compat[] = {
"brcm,bcm2835",
NULL
OpenPOWER on IntegriCloud