From patchwork Fri Apr 12 19:17:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2437651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id C07F93FD40 for ; Fri, 12 Apr 2013 19:19:44 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQjUv-00048o-8y; Fri, 12 Apr 2013 19:18:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQjUZ-0002Km-Mo; Fri, 12 Apr 2013 19:18:35 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQjU5-0002Hi-O9 for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2013 19:18:11 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ML500C6RPLYNJ50@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 13 Apr 2013 04:18:03 +0900 (KST) X-AuditID: cbfee61a-b7fa86d0000045ae-70-51685deaf640 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 78.E7.17838.AED58615; Sat, 13 Apr 2013 04:18:03 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ML500CT6PL8T090@mmp2.samsung.com>; Sat, 13 Apr 2013 04:18:02 +0900 (KST) From: 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 Message-id: <1365794250-14436-3-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1365794250-14436-1-git-send-email-t.figa@samsung.com> References: <1365794250-14436-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsVy+t9jQd3XsRmBBtNPclj8nXSM3WLv23+M Fv9mn2KzuPX5EbvFxpUf2SwOzH7IanG0x87i/6PXrBanL11jtDi4bimrxZnfuha9C66yWazY eoHF4mzTG3aLTY+vsVrMOL+PyeL2ZV6L39saWSzWHrnLbrH0+kUmi0vzmlgsvn/7xmYx7/NO Jov1M16zWGzeNJXZYtWuP4wOUh5r5q1h9Ghp7mHz+P1rEqPHzll32T3uXNvD5vHu3Dl2j81L 6j3Oz1jI6PFy4m82j74tqxg9zr+ZyuKx/do8Zo9pr8+zeXzeJOfx+sZsxgD+KC6blNSczLLU In27BK6M19+bGQuOSVUsalrP3MB4SayLkZNDQsBE4tjn64wQtpjEhXvr2boYuTiEBKYzSvz9 vIQZwulikri/dA4rSBWbgJrE54ZHbCC2iICGxJSux+wgRcwCn1gkNv6bApYQFvCRuHnuBthY FgFViXfTv7KA2LwCThJbm/8xQ6yTl3h6vw+snlPAWWLy3WdgthBQTf/GfsYJjLwLGBlWMYqm FiQXFCel5xrqFSfmFpfmpesl5+duYgTH3DOpHYwrGywOMQpwMCrx8B6QyQgUYk0sK67MPcQo wcGsJMIbszctUIg3JbGyKrUoP76oNCe1+BCjNAeLkjjvgVbrQCGB9MSS1OzU1ILUIpgsEwen VANj9/7JZRLLQ4/8WpnrbtYfZTjriV0h15ubT1yW9cZK64gxtxr9vnG22+6U3cvjWgzL2tX+ FSnt2DTPN9zE+TQb60dub/v5oS33Alrb5YN3vOnb+C1WaO7jExsXfz7jty9Vw6nI4cZdecE/ 2585lf2y1Ak3a4l4/i+xeuadypO6eZpFP+MWTZdWYinOSDTUYi4qTgQAWHvc/LUCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130412_151806_257223_34447C15 X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] 1.7 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -2.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: mark.rutland@arm.com, heiko@sntech.de, Tomasz Figa , tomasz.figa@gmail.com, buserror@gmail.com, jacmet@sunsite.dk, augulis.darius@gmail.com, christer@weinigel.se, sylvester.nawrocki@gmail.com, m.szyprowski@samsung.com, kgene.kim@samsung.com, linux@arm.linux.org.uk, kwangwoo.lee@gmail.com, mcuelenaere@gmail.com, arnd@arndb.de, devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, john.stultz@linaro.org, ghcstop@gmail.com, linux@simtec.co.uk, broonie@opensource.wolfsonmicro.com, jekhor@gmail.com, kyungmin.park@samsung.com, tglx@linutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Signed-off-by: Kyungmin Park --- 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 #include +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);