All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <t.figa@samsung.com>
To: linux-arm-kernel@lists.infradead.org
Cc: devicetree-discuss@lists.ozlabs.org,
	linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
	kyungmin.park@samsung.com, linux@simtec.co.uk,
	broonie@opensource.wolfsonmicro.com, kwangwoo.lee@gmail.com,
	jacmet@sunsite.dk, augulis.darius@gmail.com,
	mcuelenaere@gmail.com, linux@arm.linux.org.uk,
	sylvester.nawrocki@gmail.com, buserror@gmail.com,
	christer@weinigel.se, jekhor@gmail.com, ghcstop@gmail.com,
	mark.rutland@arm.com, tomasz.figa@gmail.com, heiko@sntech.de,
	robherring2@gmail.com, m.szyprowski@samsung.com, arnd@arndb.de,
	john.stultz@linaro.org, tglx@linutronix.de,
	Tomasz Figa <t.figa@samsung.com>
Subject: [PATCH v5 02/14] clocksource: samsung-pwm: Clean up platform header
Date: Fri, 12 Apr 2013 21:17:18 +0200	[thread overview]
Message-ID: <1365794250-14436-3-git-send-email-t.figa@samsung.com> (raw)
In-Reply-To: <1365794250-14436-1-git-send-email-t.figa@samsung.com>

This patch moves private definitions out of the public platform header
and also cleans it up from unused and/or unnecessary ones.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/plat-samsung/include/plat/samsung-time.h | 11 -----------
 drivers/clocksource/samsung_pwm.c                 | 15 ++++++++++-----
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/plat-samsung/include/plat/samsung-time.h
index 4cc99bb..ecc423c 100644
--- a/arch/arm/plat-samsung/include/plat/samsung-time.h
+++ b/arch/arm/plat-samsung/include/plat/samsung-time.h
@@ -22,14 +22,6 @@ enum samsung_timer_mode {
 	SAMSUNG_PWM4,
 };
 
-struct samsung_timer_source {
-	unsigned int event_id;
-	unsigned int source_id;
-};
-
-/* Be able to sleep for atleast 4 seconds (usually more) */
-#define SAMSUNG_TIMER_MIN_RANGE	4
-
 #if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100)
 #define TCNT_MAX		0xffff
 #define TSCALER_DIV		25
@@ -42,9 +34,6 @@ struct samsung_timer_source {
 #define TSIZE			32
 #endif
 
-#define NON_PERIODIC		0
-#define PERIODIC		1
-
 extern void __init samsung_set_timer_source(enum samsung_timer_mode event,
 					enum samsung_timer_mode source);
 
diff --git a/drivers/clocksource/samsung_pwm.c b/drivers/clocksource/samsung_pwm.c
index f899cbc..974675b 100644
--- a/drivers/clocksource/samsung_pwm.c
+++ b/drivers/clocksource/samsung_pwm.c
@@ -27,6 +27,11 @@
 #include <plat/regs-timer.h>
 #include <plat/samsung-time.h>
 
+struct samsung_timer_source {
+	unsigned int event_id;
+	unsigned int source_id;
+};
+
 static struct clk *tin_event;
 static struct clk *tin_source;
 static struct clk *tdiv_event;
@@ -182,7 +187,7 @@ static int samsung_set_next_event(unsigned long cycles,
 				struct clock_event_device *evt)
 {
 	samsung_time_setup(timer_source.event_id, cycles);
-	samsung_time_start(timer_source.event_id, NON_PERIODIC);
+	samsung_time_start(timer_source.event_id, false);
 
 	return 0;
 }
@@ -195,7 +200,7 @@ static void samsung_set_mode(enum clock_event_mode mode,
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
 		samsung_time_setup(timer_source.event_id, clock_count_per_tick);
-		samsung_time_start(timer_source.event_id, PERIODIC);
+		samsung_time_start(timer_source.event_id, true);
 		break;
 
 	case CLOCK_EVT_MODE_ONESHOT:
@@ -215,11 +220,11 @@ static void samsung_timer_resume(void)
 {
 	/* event timer restart */
 	samsung_time_setup(timer_source.event_id, clock_count_per_tick);
-	samsung_time_start(timer_source.event_id, PERIODIC);
+	samsung_time_start(timer_source.event_id, true);
 
 	/* source timer restart */
 	samsung_time_setup(timer_source.source_id, TCNT_MAX);
-	samsung_time_start(timer_source.source_id, PERIODIC);
+	samsung_time_start(timer_source.source_id, true);
 }
 
 void __init samsung_set_timer_source(enum samsung_timer_mode event,
@@ -335,7 +340,7 @@ static void __init samsung_clocksource_init(void)
 	clock_rate = clk_get_rate(tin_source);
 
 	samsung_time_setup(timer_source.source_id, TCNT_MAX);
-	samsung_time_start(timer_source.source_id, PERIODIC);
+	samsung_time_start(timer_source.source_id, true);
 
 	setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate);
 
-- 
1.8.1.5

WARNING: multiple messages have this Message-ID (diff)
From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 02/14] clocksource: samsung-pwm: Clean up platform header
Date: Fri, 12 Apr 2013 21:17:18 +0200	[thread overview]
Message-ID: <1365794250-14436-3-git-send-email-t.figa@samsung.com> (raw)
In-Reply-To: <1365794250-14436-1-git-send-email-t.figa@samsung.com>

This patch moves private definitions out of the public platform header
and also cleans it up from unused and/or unnecessary ones.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/plat-samsung/include/plat/samsung-time.h | 11 -----------
 drivers/clocksource/samsung_pwm.c                 | 15 ++++++++++-----
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/plat-samsung/include/plat/samsung-time.h
index 4cc99bb..ecc423c 100644
--- a/arch/arm/plat-samsung/include/plat/samsung-time.h
+++ b/arch/arm/plat-samsung/include/plat/samsung-time.h
@@ -22,14 +22,6 @@ enum samsung_timer_mode {
 	SAMSUNG_PWM4,
 };
 
-struct samsung_timer_source {
-	unsigned int event_id;
-	unsigned int source_id;
-};
-
-/* Be able to sleep for atleast 4 seconds (usually more) */
-#define SAMSUNG_TIMER_MIN_RANGE	4
-
 #if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100)
 #define TCNT_MAX		0xffff
 #define TSCALER_DIV		25
@@ -42,9 +34,6 @@ struct samsung_timer_source {
 #define TSIZE			32
 #endif
 
-#define NON_PERIODIC		0
-#define PERIODIC		1
-
 extern void __init samsung_set_timer_source(enum samsung_timer_mode event,
 					enum samsung_timer_mode source);
 
diff --git a/drivers/clocksource/samsung_pwm.c b/drivers/clocksource/samsung_pwm.c
index f899cbc..974675b 100644
--- a/drivers/clocksource/samsung_pwm.c
+++ b/drivers/clocksource/samsung_pwm.c
@@ -27,6 +27,11 @@
 #include <plat/regs-timer.h>
 #include <plat/samsung-time.h>
 
+struct samsung_timer_source {
+	unsigned int event_id;
+	unsigned int source_id;
+};
+
 static struct clk *tin_event;
 static struct clk *tin_source;
 static struct clk *tdiv_event;
@@ -182,7 +187,7 @@ static int samsung_set_next_event(unsigned long cycles,
 				struct clock_event_device *evt)
 {
 	samsung_time_setup(timer_source.event_id, cycles);
-	samsung_time_start(timer_source.event_id, NON_PERIODIC);
+	samsung_time_start(timer_source.event_id, false);
 
 	return 0;
 }
@@ -195,7 +200,7 @@ static void samsung_set_mode(enum clock_event_mode mode,
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
 		samsung_time_setup(timer_source.event_id, clock_count_per_tick);
-		samsung_time_start(timer_source.event_id, PERIODIC);
+		samsung_time_start(timer_source.event_id, true);
 		break;
 
 	case CLOCK_EVT_MODE_ONESHOT:
@@ -215,11 +220,11 @@ static void samsung_timer_resume(void)
 {
 	/* event timer restart */
 	samsung_time_setup(timer_source.event_id, clock_count_per_tick);
-	samsung_time_start(timer_source.event_id, PERIODIC);
+	samsung_time_start(timer_source.event_id, true);
 
 	/* source timer restart */
 	samsung_time_setup(timer_source.source_id, TCNT_MAX);
-	samsung_time_start(timer_source.source_id, PERIODIC);
+	samsung_time_start(timer_source.source_id, true);
 }
 
 void __init samsung_set_timer_source(enum samsung_timer_mode event,
@@ -335,7 +340,7 @@ static void __init samsung_clocksource_init(void)
 	clock_rate = clk_get_rate(tin_source);
 
 	samsung_time_setup(timer_source.source_id, TCNT_MAX);
-	samsung_time_start(timer_source.source_id, PERIODIC);
+	samsung_time_start(timer_source.source_id, true);
 
 	setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate);
 
-- 
1.8.1.5

  parent reply	other threads:[~2013-04-12 19:17 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 19:17 [PATCH v5 00/14] ARM: samsung-time: Prepare for multiplatform support Tomasz Figa
2013-04-12 19:17 ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 01/14] ARM: SAMSUNG: Move samsung-time to drivers/clocksource Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
     [not found]   ` <1365794250-14436-2-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-04-12 20:44     ` Arnd Bergmann
2013-04-12 20:44       ` Arnd Bergmann
2013-04-12 20:52       ` Tomasz Figa
2013-04-12 20:52         ` Tomasz Figa
2013-04-12 19:17 ` Tomasz Figa [this message]
2013-04-12 19:17   ` [PATCH v5 02/14] clocksource: samsung-pwm: Clean up platform header Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 03/14] clocksource: samsung-pwm: Add infrastructure to share PWM hardware Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 20:42   ` Arnd Bergmann
2013-04-12 20:42     ` Arnd Bergmann
2013-04-12 20:47     ` Tomasz Figa
2013-04-12 20:47       ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 04/14] ARM: SAMSUNG: Unify base address definitions of timer block Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 05/14] ARM: SAMSUNG: Add new PWM platform device Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 06/14] ARM: SAMSUNG: Set PWM platform data Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 07/14] clocksource: samsung-pwm: Use platform data to setup the clocksource Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 08/14] clocksource: samsung-pwm: Synchronize register accesses Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 09/14] clocksource: samsung-pwm: Move IRQ mask/ack handling to the driver Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 10/14] ARM: SAMSUNG: Remove unused PWM timer IRQ chip code Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 11/14] clocksource: samsung-pwm: Configure dividers directly Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 12/14] clocksource: samsung-pwm: Do not use static mapping of registers Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 13/14] clocksource: samsung-pwm: Drop unnecessary includes Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 19:17 ` [PATCH v5 14/14] clocksource: samsung-pwm: Prepare for clocksource_of_init Tomasz Figa
2013-04-12 19:17   ` Tomasz Figa
2013-04-12 20:51 ` [PATCH v5 00/14] ARM: samsung-time: Prepare for multiplatform support Arnd Bergmann
2013-04-12 20:51   ` Arnd Bergmann
2013-04-22 17:37   ` Kukjin Kim
2013-04-22 17:37     ` Kukjin Kim
2013-04-22 19:21     ` Tomasz Figa
2013-04-22 19:21       ` Tomasz Figa
2013-04-12 22:22 ` Heiko Stübner
2013-04-12 22:22   ` Heiko Stübner
2013-04-12 22:26   ` Arnd Bergmann
2013-04-12 22:26     ` Arnd Bergmann
2013-04-12 22:39     ` Heiko Stübner
2013-04-12 22:39       ` Heiko Stübner
2013-04-12 22:42       ` Tomasz Figa
2013-04-12 22:42         ` Tomasz Figa
2013-04-13 12:28 ` Tomasz Figa
2013-04-13 12:28   ` Tomasz Figa
2013-04-16 16:22 ` Mark Brown
2013-04-16 16:22   ` Mark Brown
2013-04-16 20:51 ` Sylwester Nawrocki
2013-04-16 20:51   ` Sylwester Nawrocki

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=1365794250-14436-3-git-send-email-t.figa@samsung.com \
    --to=t.figa@samsung.com \
    --cc=arnd@arndb.de \
    --cc=augulis.darius@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=buserror@gmail.com \
    --cc=christer@weinigel.se \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=ghcstop@gmail.com \
    --cc=heiko@sntech.de \
    --cc=jacmet@sunsite.dk \
    --cc=jekhor@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=kwangwoo.lee@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linux@simtec.co.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=mcuelenaere@gmail.com \
    --cc=robherring2@gmail.com \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.