From patchwork Thu Jul 16 11:26:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51153 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7335E22A28 for ; Thu, 16 Jul 2015 11:27:56 +0000 (UTC) Received: by wgjx7 with SMTP id x7sf18038221wgj.3 for ; Thu, 16 Jul 2015 04:27:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=G5fFsRqO4S76g3gMzcIcF0dgTW+NsRWHpToe6FDMTLw=; b=Hds9cqG3wDlJ6gTffcfkDCatHcDHE9rUtSqzptiWZ9HP/FId38A5zMjSJQ2YST5m+g aK61jp41h21TEQXXM2niPXye/eq6G06ePUBl4v195ZqQauFzDK5188xfLf2BpHzmefSF bo4+EXOoqe9CmhpsRe+JrKokgWyiHwcLR4rFv8nBUXCFkvZTmrBWltAZvQEaYJaB4CIm ttZDthk49z6NtZ+NdH5SRLqSt8VG65X28wWnVIQYOVbb2FgddeTT0/K0efCISaEtqLnt /izEIT0Opgx+AYPwR4tyvlU+d48I6tYr8Iuys+wpj7i7Elj7Rdr78m7zwYTp/8Nlgwmr hoxg== X-Gm-Message-State: ALoCoQkR1h4MrTlkjqmD5sBSuNRJUDcSoagWdE477ceQuGebpRTMZJcVjBhNUsQ5ouj6wWu46vA8 X-Received: by 10.194.184.6 with SMTP id eq6mr4663804wjc.4.1437046075737; Thu, 16 Jul 2015 04:27:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.69 with SMTP id l5ls367lae.73.gmail; Thu, 16 Jul 2015 04:27:55 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr8926510laj.19.1437046075147; Thu, 16 Jul 2015 04:27:55 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id mh3si6699279lbb.59.2015.07.16.04.27.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jul 2015 04:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by laem6 with SMTP id m6so41597788lae.0 for ; Thu, 16 Jul 2015 04:27:55 -0700 (PDT) X-Received: by 10.112.120.134 with SMTP id lc6mr8942966lbb.86.1437046075060; Thu, 16 Jul 2015 04:27:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp191409lbb; Thu, 16 Jul 2015 04:27:54 -0700 (PDT) X-Received: by 10.66.119.105 with SMTP id kt9mr17960614pab.86.1437046073317; Thu, 16 Jul 2015 04:27:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hn9si12550120pdb.133.2015.07.16.04.27.52; Thu, 16 Jul 2015 04:27:53 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932075AbbGPL1h (ORCPT + 27 others); Thu, 16 Jul 2015 07:27:37 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:34419 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755107AbbGPL1d (ORCPT ); Thu, 16 Jul 2015 07:27:33 -0400 Received: by pdbep18 with SMTP id ep18so44365418pdb.1 for ; Thu, 16 Jul 2015 04:27:33 -0700 (PDT) X-Received: by 10.68.206.7 with SMTP id lk7mr17541285pbc.52.1437046053342; Thu, 16 Jul 2015 04:27:33 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id sc1sm7697931pac.36.2015.07.16.04.27.32 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Jul 2015 04:27:32 -0700 (PDT) From: Viresh Kumar To: Thomas Gleixner , Daniel Lezcano Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Mikael Starvik , Jesper Nilsson , Rabin Vincent , Guenter Roeck , linux-cris-kernel@axis.com Subject: [PATCH 06/23] cris/time: Migrate to new 'set-state' interface Date: Thu, 16 Jul 2015 16:56:18 +0530 Message-Id: X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Migrate cris driver to the new 'set-state' interface provided by clockevents core, the earlier 'set-mode' interface is marked obsolete now. This also enables us to implement callbacks for new states of clockevent devices, for example: ONESHOT_STOPPED. Cc: Mikael Starvik Cc: Jesper Nilsson Cc: Rabin Vincent Cc: Guenter Roeck Cc: linux-cris-kernel@axis.com Signed-off-by: Viresh Kumar --- arch/cris/arch-v32/kernel/time.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index 4fce9f1f7cc0..d2a84407654a 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c @@ -172,8 +172,7 @@ void handle_watchdog_bite(struct pt_regs *regs) extern void cris_profile_sample(struct pt_regs *regs); static void __iomem *timer_base; -static void crisv32_clkevt_mode(enum clock_event_mode mode, - struct clock_event_device *dev) +static int crisv32_clkevt_switch_state(struct clock_event_device *dev) { reg_timer_rw_tmr0_ctrl ctrl = { .op = regk_timer_hold, @@ -181,6 +180,7 @@ static void crisv32_clkevt_mode(enum clock_event_mode mode, }; REG_WR(timer, timer_base, rw_tmr0_ctrl, ctrl); + return 0; } static int crisv32_clkevt_next_event(unsigned long evt, @@ -231,7 +231,9 @@ static struct clock_event_device crisv32_clockevent = { .name = "crisv32-timer", .rating = 300, .features = CLOCK_EVT_FEAT_ONESHOT, - .set_mode = crisv32_clkevt_mode, + .set_state_oneshot = crisv32_clkevt_switch_state, + .set_state_shutdown = crisv32_clkevt_switch_state, + .tick_resume = crisv32_clkevt_switch_state, .set_next_event = crisv32_clkevt_next_event, };