From patchwork Fri Jun 12 08:00:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 49807 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88D1F228DB for ; Fri, 12 Jun 2015 08:01:22 +0000 (UTC) Received: by lbcue7 with SMTP id ue7sf7686578lbc.3 for ; Fri, 12 Jun 2015 01:01:21 -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=q6WlZIh/Z3EASKEA1DPsJql3qYQOcDW5faDdadWSC4U=; b=HPEBtv6nda0Zt8iJDvZsqG/s/lMI/zCzjDFYCy6ZpZGSndfGJneUMny6gKD5vJI5Dz NFowFd+3ixoH5026E60RswnaADCHpqM0SwfxJ+ghRlVgfCQ6EZQ+phaXKC4k0oV6gLpU CbqMCosTYoZmYfFWcRK1vE9GroXlfTymlV4V5wnI9D411+Z7pSAVPD5pgtuhQ1M7z8mc omcwbXDqYzqgLJ7g2bYXCqj2AV2zSn+02AAxKa1kwKPFKVsYiAEzHQbkNVHDkYeXsnjx WQa7tu/S07LGTEYUgmCrtJx0gtdtwiGfZ4HkXJMRG0eukqFTu/cvn1QLHa9lVj4qfZwg DfXQ== X-Gm-Message-State: ALoCoQk5Q794z9vnYMfgZhb1lX/hG1ZuTpwpInOzySQNiv9XkqLbc+Zf9LW3wvWSZcTcNOvsDdrh X-Received: by 10.112.138.2 with SMTP id qm2mr12805753lbb.19.1434096081577; Fri, 12 Jun 2015 01:01:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.196 with SMTP id a4ls16873lak.27.gmail; Fri, 12 Jun 2015 01:01:21 -0700 (PDT) X-Received: by 10.152.3.130 with SMTP id c2mr13992977lac.81.1434096081364; Fri, 12 Jun 2015 01:01:21 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id wj6si2753106lbb.87.2015.06.12.01.01.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 01:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbcue7 with SMTP id ue7so15559413lbc.0 for ; Fri, 12 Jun 2015 01:01:21 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr13925224lbc.86.1434096081213; Fri, 12 Jun 2015 01:01:21 -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 hn6csp361706lbb; Fri, 12 Jun 2015 01:01:20 -0700 (PDT) X-Received: by 10.68.250.194 with SMTP id ze2mr21461580pbc.24.1434096079237; Fri, 12 Jun 2015 01:01:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gf2si4302023pbd.94.2015.06.12.01.01.18; Fri, 12 Jun 2015 01:01:19 -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 S1754671AbbFLIBJ (ORCPT + 29 others); Fri, 12 Jun 2015 04:01:09 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:34651 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755014AbbFLIAv (ORCPT ); Fri, 12 Jun 2015 04:00:51 -0400 Received: by pdbki1 with SMTP id ki1so19848679pdb.1 for ; Fri, 12 Jun 2015 01:00:50 -0700 (PDT) X-Received: by 10.66.90.137 with SMTP id bw9mr21311626pab.52.1434096050503; Fri, 12 Jun 2015 01:00:50 -0700 (PDT) Received: from localhost ([122.167.70.98]) by mx.google.com with ESMTPSA id cu8sm2787581pad.1.2015.06.12.01.00.49 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Jun 2015 01:00:49 -0700 (PDT) From: Viresh Kumar To: Thomas Gleixner , Daniel Lezcano Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com Subject: [PATCH V2 5/7] clocksource: bcm_kona: Migrate to new 'set-state' interface Date: Fri, 12 Jun 2015 13:30:15 +0530 Message-Id: <694c6f0a27008c05ac58cd1fe97f874144395387.1434095303.git.viresh.kumar@linaro.org> 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.217.178 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 bcm_kona driver to the new 'set-state' interface provided by the 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. Oneshot callback isn't required as it was empty. Acked-by: Ray Jui Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Viresh Kumar --- drivers/clocksource/bcm_kona_timer.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c index f1e33d08dd83..e717e87df9bc 100644 --- a/drivers/clocksource/bcm_kona_timer.c +++ b/drivers/clocksource/bcm_kona_timer.c @@ -127,25 +127,18 @@ static int kona_timer_set_next_event(unsigned long clc, return 0; } -static void kona_timer_set_mode(enum clock_event_mode mode, - struct clock_event_device *unused) +static int kona_timer_shutdown(struct clock_event_device *evt) { - switch (mode) { - case CLOCK_EVT_MODE_ONESHOT: - /* by default mode is one shot don't do any thing */ - break; - case CLOCK_EVT_MODE_UNUSED: - case CLOCK_EVT_MODE_SHUTDOWN: - default: - kona_timer_disable_and_clear(timers.tmr_regs); - } + kona_timer_disable_and_clear(timers.tmr_regs); + return 0; } static struct clock_event_device kona_clockevent_timer = { .name = "timer 1", .features = CLOCK_EVT_FEAT_ONESHOT, .set_next_event = kona_timer_set_next_event, - .set_mode = kona_timer_set_mode + .set_state_shutdown = kona_timer_shutdown, + .tick_resume = kona_timer_shutdown, }; static void __init kona_timer_clockevents_init(void)