From patchwork Tue Nov 29 13:45:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kochetkov X-Patchwork-Id: 9452125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3446560710 for ; Tue, 29 Nov 2016 13:50:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2624527F93 for ; Tue, 29 Nov 2016 13:50:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1953528334; Tue, 29 Nov 2016 13:50:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A445227F93 for ; Tue, 29 Nov 2016 13:50:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cBimP-0001gv-PF; Tue, 29 Nov 2016 13:49:05 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cBijJ-0007gy-TI; Tue, 29 Nov 2016 13:45:57 +0000 Received: by mail-lf0-x242.google.com with SMTP id p100so12711846lfg.2; Tue, 29 Nov 2016 05:45:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zPlos5my+4iMmpPibPuUj5QD/Zc+Vzx5FVXPmnOOs+0=; b=rkAAqDmtbu+WrLPK97YlqJs4tgNQlO/Zl63SATLMCicmAjiDARPudARug/A2DjElUN BEhVyMpTg77by899tVapyhhfEcvd1kwp/KRpXKL1wSXjjRZW8ExYBbBd3e7pLwxgQBMH +oHkKqYELBtM13/wN9uI9LfBDSc1srH6GrhA7cPGMEpgtsDQfVMdNY6cVGf4aSVq5gEn 63CGjv4AvBS9GyRpXZtb70qVzK+Hf6PfTrYXzx6tqsMukELnl3G42XI1xOdYsfWjvvns ZWLvUR7FHvMivzDXuYg1246HeC05EtRRKSErGUOnNjiGqqIKq/NHtXpzX+7m0HEF0fR3 8WDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zPlos5my+4iMmpPibPuUj5QD/Zc+Vzx5FVXPmnOOs+0=; b=e8+JPlo+onh3Rq9fq7PU/dr8g4ZakHXswBdZ27JXBUSAnYQLlTDog8FB2Home1dl0W UldKHS+SjGEl1FeWGsuo5pFxjnuTRyr82OJj7vGpIXYfvapiX77Ne+Wub1k7QOPxBlvR vRzUaOZZIuwfFkBjAOa12f8Czy7LyRN7+r9uQ9eNdgp+9aclWCUt0zNGQ1s5NOe0Uv4D iKgZwa4wEZNPAhcfABq7wC+lhDgPf/xetlxiDc2Bozr5J3W669PQwfMOjj1OFus/BaVg /bB+1C0JIgzJOUP3ovt6bt5z8wwLn4SJSf0koly1rOLthxOsBMcso58QMCHDZrTY3noO QQHQ== X-Gm-Message-State: AKaTC015xtTNN0uleCk3TGlurQ+jjKxsi68G1u0184l2ZnWfAKzpWRDOopYlfqRjXW86LQ== X-Received: by 10.46.78.1 with SMTP id c1mr12545026ljb.39.1480427134089; Tue, 29 Nov 2016 05:45:34 -0800 (PST) Received: from ubuntu.lintech.local ([185.35.119.87]) by smtp.gmail.com with ESMTPSA id y3sm250543lfj.42.2016.11.29.05.45.32 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Nov 2016 05:45:33 -0800 (PST) From: Alexander Kochetkov To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 09/13] clocksource/drivers/rockchip_timer: move TIMER_INT_UNMASK out of rk_timer_enable() Date: Tue, 29 Nov 2016 16:45:14 +0300 Message-Id: <1480427118-5126-10-git-send-email-al.kochet@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1480427118-5126-1-git-send-email-al.kochet@gmail.com> References: <1480343486-25539-1-git-send-email-al.kochet@gmail.com> <1480427118-5126-1-git-send-email-al.kochet@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161129_054554_427837_50208111 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Huang Tao , Heiko Stuebner , Alexander Kochetkov , Daniel Lezcano , Russell King , Rob Herring , Thomas Gleixner , Caesar Wang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This allow to enable timer without enabling interrupts from it. As that mode will be used in clocksource implementation. This is refactoring step without functional changes. Signed-off-by: Alexander Kochetkov --- drivers/clocksource/rockchip_timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c index a17dc61..61c3bb1 100644 --- a/drivers/clocksource/rockchip_timer.c +++ b/drivers/clocksource/rockchip_timer.c @@ -60,8 +60,7 @@ static inline void rk_timer_disable(struct rk_timer *timer) static inline void rk_timer_enable(struct rk_timer *timer, u32 flags) { - writel_relaxed(TIMER_ENABLE | TIMER_INT_UNMASK | flags, - timer->ctrl); + writel_relaxed(TIMER_ENABLE | flags, timer->ctrl); } static void rk_timer_update_counter(unsigned long cycles, @@ -83,7 +82,8 @@ static inline int rk_timer_set_next_event(unsigned long cycles, rk_timer_disable(timer); rk_timer_update_counter(cycles, timer); - rk_timer_enable(timer, TIMER_MODE_USER_DEFINED_COUNT); + rk_timer_enable(timer, TIMER_MODE_USER_DEFINED_COUNT | + TIMER_INT_UNMASK); return 0; } @@ -101,7 +101,7 @@ static int rk_timer_set_periodic(struct clock_event_device *ce) rk_timer_disable(timer); rk_timer_update_counter(timer->freq / HZ - 1, timer); - rk_timer_enable(timer, TIMER_MODE_FREE_RUNNING); + rk_timer_enable(timer, TIMER_MODE_FREE_RUNNING | TIMER_INT_UNMASK); return 0; }