Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: tomasz.figa@gmail.com, Kukjin Kim <kgene.kim@samsung.com>,
	linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org,
	'Sylwester Nawrocki' <sylvester.nawrocki@gmail.com>
Subject: [PATCH 4/5 v2] Add samsung-time support for s5pc100
Date: Sun, 02 Dec 2012 20:44:19 +0100	[thread overview]
Message-ID: <50BBAF93.2080004@openwide.fr> (raw)
In-Reply-To: <201211280057.16345.heiko@sntech.de>

This patch replace ARCH_USES_GETTIMEOFFSET by GENERIC_CLOCKEVENTS for s5pc100 device.
It becomes possible to use the high-resolution timer and dynamic ticks.


Signed-off-by: Naour Romain <romain.naour@openwide.fr>

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6e00aea..a8c3115 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -796,7 +796,8 @@ config ARCH_S5P64X0
 
 config ARCH_S5PC100
 	bool "Samsung S5PC100"
-	select ARCH_USES_GETTIMEOFFSET
+	select GENERIC_CLOCKEVENTS
+	select CLKSRC_MMIO
 	select CLKDEV_LOOKUP
 	select CPU_V7
 	select GENERIC_GPIO
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
index 15170be..3861d5e 100644
--- a/arch/arm/mach-s5pc100/Kconfig
+++ b/arch/arm/mach-s5pc100/Kconfig
@@ -9,6 +9,7 @@ if ARCH_S5PC100
 
 config CPU_S5PC100
 	bool
+	select SAMSUNG_HRT
 	select S5P_EXT_INT
 	select SAMSUNG_DMADEV
 	help
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index dba7384..c542df4 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -52,6 +52,7 @@
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/asoc-s3c.h>
 #include <plat/backlight.h>
+#include <plat/samsung-time.h>
 
 #include "common.h"
 
@@ -223,6 +224,7 @@ static void __init smdkc100_map_io(void)
 	s5pc100_init_io(NULL, 0);
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs));
+	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 }
 
 static void __init smdkc100_machine_init(void)
@@ -258,6 +260,6 @@ MACHINE_START(SMDKC100, "SMDKC100")
 	.handle_irq	= vic_handle_irq,
 	.map_io		= smdkc100_map_io,
 	.init_machine	= smdkc100_machine_init,
-	.timer		= &s3c24xx_timer,
+	.timer		= &samsung_timer,
 	.restart	= s5pc100_restart,
 MACHINE_END
diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/plat-samsung/include/plat/samsung-time.h
index 13ae4b9..66363e8 100644
--- a/arch/arm/plat-samsung/include/plat/samsung-time.h
+++ b/arch/arm/plat-samsung/include/plat/samsung-time.h
@@ -30,7 +30,7 @@ struct samsung_timer_source {
 /* Be able to sleep for atleast 4 seconds (usually more) */
 #define SAMSUNG_TIMER_MIN_RANGE	4
 
-#ifdef CONFIG_ARCH_S3C24XX
+#if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100)
 #define TCNT_MAX		0xffff
 #define TSCALER_DIV		25
 #define TDIV			50
-- 

  parent reply	other threads:[~2012-12-02 19:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 20:56 [PATCH] S3C24XX: add clockevent/clocksource support Romain Naour
2012-10-25 20:39 ` Tomasz Figa
2012-10-26 10:51   ` Romain Naour
2012-11-23  2:30     ` Kukjin Kim
2012-11-25  2:54       ` Romain Naour
2012-11-25 11:09         ` Tomasz Figa
2012-11-27 23:27         ` [PATCH 1/3] Rename s5p-time to samsung-time Romain Naour
2012-11-27 23:57           ` Heiko Stübner
2012-11-29 23:18             ` Romain Naour
2012-11-29 23:59               ` Heiko Stübner
2012-12-02 19:43               ` [PATCH 0/5 v2] S3C / S5PC100: add clockevent/clocksource support Romain Naour
2012-12-02 19:44             ` [PATCH 1/5 v2] Rename s5p-time to samsung-time Romain Naour
2012-12-10 12:59               ` Heiko Stübner
2012-12-15 21:43                 ` Romain Naour
2013-01-08 21:00                   ` Tomasz Figa
2013-01-09 19:26                     ` Kukjin Kim
2013-01-09 22:43                       ` Romain Naour
2013-01-09 22:43                     ` [PATCH 0/5 v3] S3C / S5PC100: add clockevent/clocksource support Romain Naour
2013-01-10  0:14                       ` Tomasz Figa
2013-01-10  0:38                         ` Kukjin Kim
2013-01-10  0:37                       ` Heiko Stübner
2013-01-10  0:48                         ` Kukjin Kim
2013-01-09 22:43                     ` [PATCH 1/5 v3] Rename s5p-time to samsung-time Romain Naour
2013-01-09 22:43                     ` [PATCH 2/5 v3] Add samsung-time support for s3c24xx Romain Naour
2013-01-10  3:03                       ` Kukjin Kim
2013-01-09 22:44                     ` [PATCH 3/5 v3] Add samsung-time support for s3c64xx Romain Naour
2013-01-09 22:44                     ` [PATCH 4/5 v3] Add samsung-time support for s5pc100 Romain Naour
2013-01-09 22:44                     ` [PATCH 5/5 v3] Remove unused plat-samsung/time.c Romain Naour
2012-12-02 19:44             ` [PATCH 2/5 v2] Add samsung-time support for s3c24xx Romain Naour
2012-12-10 13:00               ` Heiko Stübner
2012-12-15 21:40                 ` Romain Naour
2012-12-02 19:44             ` [PATCH 3/5 v2] Add samsung-time support for s3c64xx Romain Naour
2012-12-02 19:44             ` Romain Naour [this message]
2012-12-02 19:44             ` [PATCH 5/5 v2] Remove unused plat-samsung/time.c Romain Naour
2012-12-10 12:57               ` Heiko Stübner
2012-12-15 21:40                 ` Romain Naour
2012-12-15 21:40             ` [PATCH 5/5 v3] " Romain Naour
2012-11-27 23:27         ` [PATCH 2/3] Add samsung-time support for s3c24xx Romain Naour
2012-11-27 23:27         ` [PATCH 3/3] Add samsung-time support for s3c64xx Romain Naour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BBAF93.2080004@openwide.fr \
    --to=romain.naour@openwide.fr \
    --cc=ben-linux@fluff.org \
    --cc=heiko@sntech.de \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=tomasz.figa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox