Skip to contentSkip to conversation

Add support for hr timer

PATCH New [email protected] 1 participant 1 message Nov 11, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for hr timer

From: aditya <[email protected]>

This patch add support for the S3C64XX hr timer.

---
 arch/arm/mach-s3c6410/Kconfig               |    2 +
 arch/arm/plat-s3c/Makefile                  |   10 +
 arch/arm/plat-s3c/hr-time.c                 |  301 +++++++++++++++++++++++++++
 arch/arm/plat-s3c/include/plat/regs-timer.h |   11 +
 4 files changed, 324 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s3c/hr-time.c
arch/arm/mach-s3c6410/Kconfig +2 -0
index f9d0f09..29cfd0c 100644
@@ -11,6 +11,8 @@ config CPU_S3C6410
 	bool
 	select CPU_S3C6400_INIT
 	select CPU_S3C6400_CLOCK
+	select GENERIC_TIME
+	select GENERIC_CLOCKEVENTS
 	help
 	  Enable S3C6410 CPU support
 
arch/arm/plat-s3c/Makefile +10 -0
index 3c09109..6c612aa 100644
@@ -12,7 +12,17 @@ obj-				:=
 # Core support for all Samsung SoCs
 
 obj-y				+=  init.o
+ifdef CONFIG_NO_HZ
+obj-y				+= hr-time.o
+else
+
+ifndef CONFIG_HIGH_RES_TIMERS
 obj-y				+= time.o
+else
+obj-y				+= hr-time.o
+endif
+
+endif
 obj-y				+= clock.o
 obj-y				+= pwm-clock.o
 obj-y				+= gpio.o
arch/arm/plat-s3c/hr-time.c new file +301 -0

301 lines not on this page · raw message

arch/arm/plat-s3c/include/plat/regs-timer.h +11 -0
index d097d92..e9994db 100644
@@ -117,6 +117,17 @@
 #define S3C2410_TCON_T0INVERT	  (1<<2)
 #define S3C2410_TCON_T0MANUALUPD  (1<<1)
 #define S3C2410_TCON_T0START	  (1<<0)
+/* Interrupt Control and Status register*/
+#define S3C_TINT_CSTAT_T4INT	(1<<9)
+#define S3C_TINT_CSTAT_T3INT	(1<<8)
+#define S3C_TINT_CSTAT_T2INT	(1<<7)
+#define S3C_TINT_CSTAT_T1INT	(1<<6)
+#define S3C_TINT_CSTAT_T0INT	(1<<5)
+#define S3C_TINT_CSTAT_T4INTEN	(1<<4)
+#define S3C_TINT_CSTAT_T3INTEN	(1<<3)
+#define S3C_TINT_CSTAT_T2INTEN	(1<<2)
+#define S3C_TINT_CSTAT_T1INTEN	(1<<1)
+#define S3C_TINT_CSTAT_T0INTEN	(1<<0)
 
 #endif /*  __ASM_ARCH_REGS_TIMER_H */
 
Signature · 1 line
1.6.2.5