From patchwork Thu May 9 11:10:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 163713 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp819594ilr; Thu, 9 May 2019 04:12:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnH9YWBg0mBr9SDXz5JZeA5dgO8bh5fLu70w6x9SrjgJuhQyV4I6E2rHyppz9BWI4d1/Ro X-Received: by 2002:a17:902:4643:: with SMTP id o61mr4085082pld.95.1557400352917; Thu, 09 May 2019 04:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557400352; cv=none; d=google.com; s=arc-20160816; b=Yk6XTcF/xJUgViLPqUmyVvUeji7eIFlKcydVyB2dZFLruCl+LuAaMXkT4wvnm9+i2X oH1xf16GD3d2etk7hAdiFVwLduNbiy+xpuUmEms2LvtrvQ/DkwpErjqHaWRLCoKzYNCB B9+MpNboXXUjo0awFT0e6y5WQl66CH2IldO0WwzhoOtGMUGLTJ0COQBrqq5Eu7Oxrmjh DFsIKE4foVA22oSzgJ52knqYjyuGYKHNv7ME4H0gLiLFJxNcM3Jkv6xWZzUMoZh3mDx4 miduai5Wq6tYy0COJ3F7Zev80BFq3By6+VjlLA8miXnzvt6b/8tYT5cEi5a6Rlp1gPFK E4SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=kv9Gg7wOfmL+wc19PLSZwbSNlh1m7pR6gGXghMqKj+Q=; b=DN9aGt1Aa3YssMfOdpSJgK3WuGll8BhufX7QVl7jtgc6TgXQPOfjOoCiXO7NN2Mim7 55dJ1gF+A8HlAi2b6WwTz/nuqy4LkBVQo9I7jRsoU0sd2pjGYlxCw2W7fljjli5Tf9rX M4Hxm4sRV3azTFCtIJGfzKiC3XSQJamEfCruoVnS0UeJnDSYAnYr8IYSyavLYHNyp/hL u2thtJV8M5WKPXUdKDPW17we5srlNoNxbHNZYPbx4Q4zl7Wj4swP/KoqU9wU5nWUISjZ rpIbF2LcjFp4CnYaTOvYAscyPdEVOTScvZEsvhHsjEzaB+CqBKpHWQgVueefFRlN75b5 9wGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZSOSTbeL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si2457152pgs.308.2019.05.09.04.12.32; Thu, 09 May 2019 04:12:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZSOSTbeL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbfEILMb (ORCPT + 30 others); Thu, 9 May 2019 07:12:31 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40333 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfEILLd (ORCPT ); Thu, 9 May 2019 07:11:33 -0400 Received: by mail-wm1-f65.google.com with SMTP id h11so2625783wmb.5 for ; Thu, 09 May 2019 04:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kv9Gg7wOfmL+wc19PLSZwbSNlh1m7pR6gGXghMqKj+Q=; b=ZSOSTbeLUM+WduaH5DIUMhdAUFskp10W/dVpZKJcgy5jCLvb5X//1FQXBf4kqQn41s gNi17ihaAJ8vshdbXN1DiFXQmPvEUuGS/7EJe3P2Mo6R5q3E99PmsntDrhSE0olQHw+s lF7T9lgxVat/P8ULcY1irobhb1DFegGLMKGRh18kh68gLXzRcdANccvn4TOVQ9eb2AiT Gmc/QjCNi2NVn3zYJZZvERQa14Wh4j4tMaHzmiU36t0/IMQ9Jtu6MjojDDc8sd17Cqkz gpWUIiSY+WTEDAP5YLbieswGyjp/fcqnK6GIZGxWr3jfl0I9KApye7laXduQryxGpvZn cHEA== 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; bh=kv9Gg7wOfmL+wc19PLSZwbSNlh1m7pR6gGXghMqKj+Q=; b=i6Yf9GefoNCXbhsHaKCxE8oZf7xVbSamEKBcFsDnSrioQeoWwoWKntmn380wNAeb5L pmsIM0dq/P+EKdMgwjMAX3cTLNwj/zgCA4/ZK8HBvwByCyQ/bidVeFpCWDyOSMZQSwJy 54kOCZmDoFAurqmApY/xvvVyIiZTKSv1z5ZUE8O5n+C2wNZFQcT3E6jrNyOLPV3ZW6fG 0aW2Zg+KjxxqqTshAPpAw4p1mHxyNLQ7YiuMBUNAlcL4Q9H0D0csCNKhnShlKEFMeGq5 O1MZ3YqqxCDQuEYIak+rGsyppQ+PNqWGi0KJIgd4lxyokJzVfcVVrsXGX4Av5jA47NF4 ifvg== X-Gm-Message-State: APjAAAWgYaFyx/UTGlRD8V75CUCTpJKAiBvE35IJ5XWMQg2U5Qu4fKer eI9CZe9qzoeWf2Ffu6C9wcRpDQ== X-Received: by 2002:a1c:9a14:: with SMTP id c20mr2585565wme.104.1557400291553; Thu, 09 May 2019 04:11:31 -0700 (PDT) Received: from mai.irit.fr ([141.115.39.235]) by smtp.gmail.com with ESMTPSA id z7sm2299778wme.26.2019.05.09.04.11.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 04:11:30 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Sugaya Taichi Subject: [PATCH 04/15] clocksource/drivers/timer-milbeaut: Fix to enable one-shot timer Date: Thu, 9 May 2019 13:10:37 +0200 Message-Id: <20190509111048.11151-4-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509111048.11151-1-daniel.lezcano@linaro.org> References: <7e786ba3-a664-8fd9-dd17-6a5be996a712@linaro.org> <20190509111048.11151-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sugaya Taichi Fix mlb_set_oneshot_state() to enable one-shot timer. The function should stop and start a timer, but "start" statement was dropped. Kick the register to start one-shot timer. Fixes: b58f28f306db ("clocksource/drivers/timer-milbeaut: Introduce timer for Milbeaut SoCs") Signed-off-by: Sugaya Taichi Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-milbeaut.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/clocksource/timer-milbeaut.c b/drivers/clocksource/timer-milbeaut.c index f2019a88e3ee..9fd5d081fac4 100644 --- a/drivers/clocksource/timer-milbeaut.c +++ b/drivers/clocksource/timer-milbeaut.c @@ -79,6 +79,8 @@ static int mlb_set_state_oneshot(struct clock_event_device *clk) struct timer_of *to = to_timer_of(clk); u32 val = MLB_TMR_TMCSR_CSL_DIV2; + writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS); + val |= MLB_TMR_TMCSR_CNTE | MLB_TMR_TMCSR_TRG | MLB_TMR_TMCSR_INTE; writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS); return 0; }