From patchwork Tue Jan 24 12:16:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kochetkov X-Patchwork-Id: 9535099 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 25C896042C for ; Tue, 24 Jan 2017 12:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1668C27FBE for ; Tue, 24 Jan 2017 12:20:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B349280FC; Tue, 24 Jan 2017 12:20:27 +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=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 058CE27FBE for ; Tue, 24 Jan 2017 12:20:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cW05H-00029o-Vr; Tue, 24 Jan 2017 12:20:23 +0000 Received: from mail-lf0-f67.google.com ([209.85.215.67]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cW03D-0007cz-Ef; Tue, 24 Jan 2017 12:18:17 +0000 Received: by mail-lf0-f67.google.com with SMTP id q89so17036470lfi.1; Tue, 24 Jan 2017 04:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VjAGm/v2qm4HA7qZgDBBCD2XunCE6M3QA1Gwleey6OQ=; b=rS81eUUyyUv+MsaUXEErCncofmg/4G/Go3KgoqpOOKvweeLaP7BjYOjwzxcqx7E5Pg 6m5PA2bduZGiG39o/bq91x+/fwufCAmZA1IQ7Cr8cCO+7aVKdDOU1LfiQHsJGVtXAonl HeoZFrLhf4X3+2iJoyaQv/JYAhY4t/SIqYwrmprwLPWiIvn7R6bmujk2qeFJlr5Tc7Qf K7Cu9aJGVZCuUFUzSEf5Xy4JbmbVZvNTp4zcTc46SCoN+IfUm31d8MHc1rPSF2gZ/HCp n3Suv8BcThfoxYoY4l3TXuTvjLPJzEJG/WZMHDIeexCu2bBU6S/sJGLGMTM+KQGyOD0q a5pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VjAGm/v2qm4HA7qZgDBBCD2XunCE6M3QA1Gwleey6OQ=; b=rIWArtsATUt87138JsXvxGGTOdtfDf++eE1Cquc4mJWzZFxdr614XczzhfzjiJdRxj zxxwEhMlfkcs5NBegjaA5BuHnhNuU/xga5+hodL2WZAH74e0sDVzsIp/gW3h5wbCKB7M hCyeH+b2+ZGdzUCgFdiBW/q4zOqPzQPo22Mk5D3utkPXKdZBLhtZy3H1IX9MRyThCUxR RRhfkZ+BLIoJAuB/54ExCdG/FErjV2iHfk/+bXRUE6sHg/2qLxlEX6I0/kWyZIAxFKbS lQCWBuMoinaXj4d4skKMnPiNegc3nwfxAoKpP9JWHErYm0PFKJeA9foGrXfeka2+R+wd 9A2w== X-Gm-Message-State: AIkVDXL0/ndBXYauH4X1e6t1wN1DZGtEknwKKtW5+uUq6uhqdgPZSA9mMw2MIbVjtbKjWw== X-Received: by 10.25.136.8 with SMTP id k8mr9095729lfd.47.1485260218584; Tue, 24 Jan 2017 04:16:58 -0800 (PST) Received: from ubuntu.lintech.local ([185.35.119.87]) by smtp.gmail.com with ESMTPSA id e86sm7348934lji.32.2017.01.24.04.16.57 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jan 2017 04:16:57 -0800 (PST) From: Alexander Kochetkov To: Daniel Lezcano , Heiko Stuebner , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH v5 7/8] clocksource/drivers/rockchip_timer: move TIMER_INT_UNMASK out of rk_timer_enable() Date: Tue, 24 Jan 2017 15:16:42 +0300 Message-Id: <1485260203-14216-8-git-send-email-al.kochet@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1485260203-14216-1-git-send-email-al.kochet@gmail.com> References: <1485260203-14216-1-git-send-email-al.kochet@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170124_041815_725318_5CCDCF25 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Huang Tao , Alexander Kochetkov , Russell King , Rob Herring , Thomas Gleixner , Caesar Wang 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 Reviwed-by: Heiko Stübner --- 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; }