Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2816533img; Sun, 24 Mar 2019 20:06:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNPhT/oPtiFvja9NP5nHToVudvJEIQd1oxmgl/rUCMsSb0aSSkWWb6gFfv3F7WTyDwpUYM X-Received: by 2002:a17:902:6b48:: with SMTP id g8mr22621948plt.21.1553483206337; Sun, 24 Mar 2019 20:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553483206; cv=none; d=google.com; s=arc-20160816; b=qUuKqW93SRvgl91AB8TvOP0PALNrAh0MtkIZMCcHH8kQUk7oZk2blF4DvUjgeC771B vIbYhgShhIadyfiAsI9W2OAYm/KKHBDDp4wEpUabFSszUWf9GUAF3iobkBxnXmflMAv2 rJyUovSad92/Jvk77+dg69gMaPEWg5Su1c23jdESoWPviKVIJ/mvNV93WGYyI/WUwXT4 Ub0wnHHvpJ8cUqUV64vsfNc8fd4n9KHDPEg3JPRSS9y7eIMcgxLRJ9N/Ai4xTOxYS6M3 +7gLGny8K2w16HjsAyTsCRgDdfnXktDOtlZYwS5OIu4BCj51JvR5HA+eq9Am91OicaVF bUxg== 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; bh=iiUDipOap5XzNFOSTN9Y2r2/JCc7CSCGLq0y/m8FpkQ=; b=fjzqFcmK9VnCOeBBW8ZqT2HX+iEFxN4X9Y7LJBmn5QychcFx5kz2rLy+lQfUb7JRUw nuiPFupVN5W7/jA52KfVWyBA383ku9loZZusdkq20cOtnzUduDbB9u2bb5U0EAGD/Hv4 ZN3+1fCSEg1tTirb+w8VtMaIoHN0KAPyHufPJqdgFC/WP/B2MIZsrfkHuIxc9cEi1Rgm lTcLqBvklHz5AerW0Vr90yF8erm9P0TFIasPSOkq0JdaMHYyjBO0FymwmVYrT7mejhDw pSGBcUKTB+gY+WFVV1hvr6o37cBzXy8BfE/HigdfCCHoF/V179qj+1wKKkHi8YLHNCL1 gEcw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q65si12532900pfi.185.2019.03.24.20.06.31; Sun, 24 Mar 2019 20:06:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729406AbfCYDFl (ORCPT + 99 others); Sun, 24 Mar 2019 23:05:41 -0400 Received: from mx.socionext.com ([202.248.49.38]:52829 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729361AbfCYDFl (ORCPT ); Sun, 24 Mar 2019 23:05:41 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 25 Mar 2019 12:05:39 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 5DCBF6117D; Mon, 25 Mar 2019 12:05:39 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Mon, 25 Mar 2019 12:05:39 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id 2305F4031A; Mon, 25 Mar 2019 12:05:39 +0900 (JST) Received: from M20VSDK.e01.socionext.com (unknown [10.213.118.34]) by yuzu.css.socionext.com (Postfix) with ESMTP id 11348120459; Mon, 25 Mar 2019 12:05:39 +0900 (JST) From: Sugaya Taichi To: Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org Cc: Takao Orito , Kazuhiro Kasai , Shinji Kanematsu , Jassi Brar , Masami Hiramatsu , Sugaya Taichi Subject: [PATCH 2/3] clocksource/drivers/timer-milbeaut: Add shutdown function Date: Mon, 25 Mar 2019 12:05:48 +0900 Message-Id: <1553483149-8922-3-git-send-email-sugaya.taichi@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1553483149-8922-1-git-send-email-sugaya.taichi@socionext.com> References: <1553483149-8922-1-git-send-email-sugaya.taichi@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a shutdown operation to support shutdown timer. Signed-off-by: Sugaya Taichi --- 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 9fd5d08..f478061 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 int mlb_config_clock_event(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, }, -- 1.9.1