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: 2437521 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id DBE31DF2A1 for ; Fri, 12 Apr 2013 19:18:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753144Ab3DLTSG (ORCPT ); Fri, 12 Apr 2013 15:18:06 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:11168 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752997Ab3DLTSF (ORCPT ); Fri, 12 Apr 2013 15:18:05 -0400 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-samsung-soc@vger.kernel.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 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 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= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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);