From patchwork Wed Nov 23 17:29:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kochetkov X-Patchwork-Id: 9443963 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 B2D3A60779 for ; Wed, 23 Nov 2016 17:32:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEB582679B for ; Wed, 23 Nov 2016 17:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B396927165; Wed, 23 Nov 2016 17:32:04 +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 7C31327CEA for ; Wed, 23 Nov 2016 17:32:04 +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 1c9bNT-0006fO-RK; Wed, 23 Nov 2016 17:30:35 +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 1c9bMz-0005Ou-L9; Wed, 23 Nov 2016 17:30:06 +0000 Received: by mail-lf0-x242.google.com with SMTP id o141so627248lff.1; Wed, 23 Nov 2016 09:29:47 -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=GOWT4CkTyeUQ8ueUX3/HapM81RTmXVPUem5n5hZKZN8=; b=rTwTSEBLgIyzs13wM4RL6TTKIxJ9hh8h19JEjZiXexSl/FB11Gsz+pCqNrfLsXIT2D /fXp8cdsRcJlZ5LhCzbMt2PmEJ47pHl1qZDNglo52TMYTHzHk8OdDvdL2d26FuvnLO1p 39ztFBd42udXL3w/BEMdVGKMD2k/QYaLrDUzJEtKY69RcawvUruPKFfCij1wBsQNbO9R 8HnLgNme6vbDtS/D+1WlVMfh5Puo0auBeUqSWy+8rEjs+ia/QlFTHlZwFt9K92QBLUlm s2Azed4dtTV347N5KZ9IeYBrwOj4yfXVJ4/+eMYiI8ua8xmOU93g3Dax1V33kuDN6wGa Do4g== 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=GOWT4CkTyeUQ8ueUX3/HapM81RTmXVPUem5n5hZKZN8=; b=OHPYOmJnWUpQQ864H1wLpp+y0ye3JzYpM+dnp99fJm8HYIgXJZQnwaaiiuPfeJ9/0v QMp+RX/APttLq9hYnjdxpYREkZ/q9a3tgaC3jF10DlVchzUQub7dLIsYBU9V+9vDMmYi dyPQrKHz5eRh7ZGAhYSmL+x88r4qYCwSX7ZfKSes+CB5q91lE0xJRe2n8j9H0/n4WBLJ Up/bbaHf87KCjnEnRtS9GuHZCviQcy9kAYgiMtmzMZJL6daJwhafdw5c49/zAAamcNIp kWo04IaRD/tM99Kv6CVt2+EQqQzQy2yX6EZGHWEptOuKWFcOBR0SyaTmsuwLlvYVHedt 9Uog== X-Gm-Message-State: AKaTC00WSN1HDHCwTgUsMcmeoBQDK1mumprMYPH9izic+Si6WqZzP7I2XtbNHw9AlLodog== X-Received: by 10.25.34.70 with SMTP id i67mr1206591lfi.155.1479922186265; Wed, 23 Nov 2016 09:29:46 -0800 (PST) Received: from ubuntu.lintech.local ([185.35.119.87]) by smtp.gmail.com with ESMTPSA id h71sm7455138ljh.21.2016.11.23.09.29.45 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Nov 2016 09:29:45 -0800 (PST) From: Alexander Kochetkov To: daniel.lezcano@linaro.org, tglx@linutronix.de, heiko@sntech.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 4/9] clocksource/drivers/rockchip_timer: move TIMER_INT_UNMASK out of rk_timer_enable() Date: Wed, 23 Nov 2016 20:29:32 +0300 Message-Id: <1479922177-20136-4-git-send-email-al.kochet@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1479922177-20136-1-git-send-email-al.kochet@gmail.com> References: <1479922177-20136-1-git-send-email-al.kochet@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161123_093005_975801_EBF98E19 X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. 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: Alexander Kochetkov 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. Signed-off-by: Alexander Kochetkov --- drivers/clocksource/rockchip_timer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c index 2f18166..3b530f9 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, @@ -82,7 +81,7 @@ static inline int rk_timer_set_next_event(unsigned long cycles, struct rk_timer *timer = rk_timer(ce); 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; } @@ -98,7 +97,7 @@ static int rk_timer_set_periodic(struct clock_event_device *ce) struct rk_timer *timer = rk_timer(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; }