Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp160241yba; Fri, 12 Apr 2019 00:39:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUgyaB87SkWs546B2iClV1EnA6cJMjZ/fLFZZJ9B3lx7dQepFl86TWVxM3x42vXmJ0KnLV X-Received: by 2002:a62:b40b:: with SMTP id h11mr55379324pfn.133.1555054769650; Fri, 12 Apr 2019 00:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555054769; cv=none; d=google.com; s=arc-20160816; b=gD7w7BBHC19UN92fpS01Lu6v+AYxDnxmVnUy0gy0MObi+Qxy7foLL7tD8uXYj+RqiT 290fI4J5UDlF9i7TJiWB+BsAXONL7danzz7TwkjTaR+MALhQzXwhS7M6bRZw7AR8IJ5o 7MejSbik3NI7/Sh2nnn0JV73IJNAMKddgincjbppLhJel/RovjtmGKjEDMtHV/3J0qkR GeE8ly5ot3C2dPnGpgHHJnhzwQFoklyyoITqqxTZKqA9RYaTUrbJ9Sk8iGYVuU/b0DH9 AR8iNevaDi5XM8VKsDEFIuoe/FkVFbEcBS9Kg6GCXn8cuwNZ6jHo/dEbxSDpCLbz/723 aeag== 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=hN7IEOXH9lEuULWZcrYZTOWBwid9za8EK6mUDy0yZ+mB1/5u9R4EEesnkaP5hdRK+L lR8WRuj1pePcCMQtRJKmYnunwpJTcGmCCi6yGICtaMh22gTlBh8+iPFYprkCvH0Hr9Mc 0ZPmcA+kcUYWoGw/TdBaCh595HC4mYbjFF2zlC13wAL/i90pbGKyM5y9FIv8aR5nngTa FnERbV7RIxup+FXO4nxI1dWZcJQ6x8NNsG6OrL8/WTfFSVW9m3vJCPBqJT6Q+8aSgmvd MfACn/pdwwhGT/NGoptLUh4/hkEmI1Vl5muoqyJ1OJLc2deFlFvvPnSDkW7mThOFLnsX dwTA== 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 o7si23920196plk.215.2019.04.12.00.39.13; Fri, 12 Apr 2019 00:39:29 -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 S1727198AbfDLHhU (ORCPT + 99 others); Fri, 12 Apr 2019 03:37:20 -0400 Received: from mx.socionext.com ([202.248.49.38]:45667 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbfDLHhU (ORCPT ); Fri, 12 Apr 2019 03:37:20 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 12 Apr 2019 16:37:18 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id B2336180C0E; Fri, 12 Apr 2019 16:37:18 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Fri, 12 Apr 2019 16:37:18 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id 4F6CA40372; Fri, 12 Apr 2019 16:37:18 +0900 (JST) Received: from M20VSDK.e01.socionext.com (unknown [10.213.118.34]) by yuzu.css.socionext.com (Postfix) with ESMTP id 3C501120499; Fri, 12 Apr 2019 16:37:18 +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 v2 2/3] clocksource/drivers/timer-milbeaut: Add shutdown function Date: Fri, 12 Apr 2019 16:36:50 +0900 Message-Id: <1555054611-23566-3-git-send-email-sugaya.taichi@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1555054611-23566-1-git-send-email-sugaya.taichi@socionext.com> References: <1555054611-23566-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