Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp664772yba; Thu, 9 May 2019 04:12:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4CiSmvSvLeGSM6zM5lg0X5RDC3esecc//Ms0gQI+d3TaN953QCRX9XKWOYxzX/dUMROft X-Received: by 2002:aa7:91c8:: with SMTP id z8mr4236964pfa.110.1557400367206; Thu, 09 May 2019 04:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557400367; cv=none; d=google.com; s=arc-20160816; b=bdIU2XiNIl9TFsFIabYrEpXz0sv8xlu39sCSLu9X2TGkxVQfCqILUnkpjcOBSgltSF DTU5PTcW9iIIgJ2uF/3+TIy0qodnrgwH5u5JdhwagnUpKpmwspINhubMyqDmz0G6ZWCT fkdpnwrTWtRsOxfMqfWF1Vu5hMw3HYSgEdknScfRaVCyWwCvmyHtZg+TAdUCAXLMhQM5 xRmR2pY0KE8JGbQL22S76CySiuKsTuA8itvuvG5B3KzbS+dC15lSs9DExD3qXb3UKFSz t3PLh2n1zVRWcscRmmswQ27Qh17jCB2IJCsgfo2h/WEh0upPlasPg1RSKxDi2Vp8h8By 5ZKQ== 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=/WmgvSfXfoUbACWV/y6fHRyMAz3Q73nCkH7XU2xCVsg=; b=lLKz2Grw6oZt87C0Zvr67ZpzIMJb+NNGrLMVWk2Ypt/GqM9MJowxLgsLz+Z4FflWKU Jk6S2EF0z7OuBX1Xzdcq1T+yIjTQZE8/umjjnA49c7EmhusBPH4sxcmGfAZvRk2XIqrK +aMuVNtIGKAsGWqngSyNavbxLlSg3oFRexRQmpkCuhPDLKuBkpWsjzAUmkyM8tLyBHrF bZiV9MI+fHYnc7QqQooQcJpPMl41v6xsLUGJ/bkmrYhssi4x0HbhnyaRzE9BH45QSKWd 3tmuo3UhY150F3R9oDm21+QHUsdl40HN3OMfi1Scz+ocnn8a086EgkEjJ+MI5M0cOO0M niDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JseNp/50"; 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 m8si2541335pgi.508.2019.05.09.04.12.31; Thu, 09 May 2019 04:12:47 -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="JseNp/50"; 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 S1726657AbfEILLh (ORCPT + 99 others); Thu, 9 May 2019 07:11:37 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51125 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbfEILLf (ORCPT ); Thu, 9 May 2019 07:11:35 -0400 Received: by mail-wm1-f66.google.com with SMTP id y17so1799208wmj.0 for ; Thu, 09 May 2019 04:11:33 -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=/WmgvSfXfoUbACWV/y6fHRyMAz3Q73nCkH7XU2xCVsg=; b=JseNp/50Kl6x0zRxnuIBNt6ZENsiT1YNUMbrHDI44juGeU4+0J+iOKLLbHuoCGaus+ 5VViG2X7dR05UBYpYMdYXdw/RqVhZyYDHGKYbS6uL/tcxJQzPTI+gb0rpe+5gmTxxroe 4MJqt52DjlrdkeLlRFqaw9ml50vZ47f9RoeeRcnaqDB9OgJwpxM0TEeZ4a7TkexRrHZ1 8WLO5KmaxdIm3sdVlh3Thuc6FOBveKoO7nhMvHXIaWhjNtW9mCDCoqrlie6OOJFUFzKT rAY2wx/WhyRovOurRqRrDuKTue2BxagZZLeEzX2xz9KLkmT52z/BH5/5t194OZzHQoui BYyA== 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=/WmgvSfXfoUbACWV/y6fHRyMAz3Q73nCkH7XU2xCVsg=; b=uOxOQMoAC9/8ikAEi5uWdmCLOWJJluSWrUuyMfl2JoBGLRdcbMXCsaRXnsp20jB8bD PwHJHZZkgxOUHpUu/LEHKVvVVobqJXHQX+eZy0NfU/Hq4zQL3X6de0sPIAugWYIM0FMf Vc6avpw5/4nBA8EhnXfu7q2e+tfnEYYG3MlQ+zJ1a3VsD/Vd5vcSPhIJ7wqDXBhjo0ww 9jbBezSBGce+D+IWJ+cIi3dHE0hmzr7iDW622TV6gZWt8clR+xQy80wFLup7kKANuCU5 R5S2CTpxxl+tE3e8oB9YHAAA6abgUKZ9STumuwu8Su6DblVodwHPRlsSt8intdaaCu8q boDA== X-Gm-Message-State: APjAAAVwrMbGkWVRNj9H8IjGN6Rzi2TV9wh9oRgwT/rtN6yMjxzFRg0+ UycKWZ8Fx+VLMDviH0TupKQiFA== X-Received: by 2002:a7b:c04b:: with SMTP id u11mr2341301wmc.95.1557400292983; Thu, 09 May 2019 04:11:32 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 04:11:32 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Sugaya Taichi Subject: [PATCH 05/15] clocksource/drivers/timer-milbeaut: Add shutdown function Date: Thu, 9 May 2019 13:10:38 +0200 Message-Id: <20190509111048.11151-5-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 Add a shutdown operation to support shutdown timer. Signed-off-by: Sugaya Taichi Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-milbeaut.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clocksource/timer-milbeaut.c b/drivers/clocksource/timer-milbeaut.c index 9fd5d081fac4..f4780619dbaf 100644 --- a/drivers/clocksource/timer-milbeaut.c +++ b/drivers/clocksource/timer-milbeaut.c @@ -85,6 +85,15 @@ static int mlb_set_state_oneshot(struct clock_event_device *clk) return 0; } +static int mlb_set_state_shutdown(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); + return 0; +} + static int mlb_clkevt_next_event(unsigned long event, struct clock_event_device *clk) { @@ -125,6 +134,7 @@ static struct timer_of to = { .features = CLOCK_EVT_FEAT_DYNIRQ | CLOCK_EVT_FEAT_ONESHOT, .set_state_oneshot = mlb_set_state_oneshot, .set_state_periodic = mlb_set_state_periodic, + .set_state_shutdown = mlb_set_state_shutdown, .set_next_event = mlb_clkevt_next_event, }, -- 2.17.1