From patchwork Mon Jun 8 13:40:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 49622 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 5E7D8214B2 for ; Mon, 8 Jun 2015 13:42:10 +0000 (UTC) Received: by lbcue7 with SMTP id ue7sf33697773lbc.3 for ; Mon, 08 Jun 2015 06:42:09 -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=vJwR58SueKBzMztOfvpk9GrqUIemZf0biUvjSHycK60=; b=flaxRYH6fPhsTQ/GRQK6HaCUW/cxFesvsNbEhRiMMGcu1CiHxYnURUauZinwVwz4D1 3KXcvYdOJ52jG7RdW6AE1JMcqZLZQRiddz018awuT9zm3B8SYJi55Ipvvru6jxFKJfbW GnFCV7Ew6FOC0HY3DkA5inT2C+IqY+Kv5CVPU5Vu9TCuRdkSrnlkK/2gIfFH9Ga4CAUC 5OCsTjSXv57jTsBViU10aSG37Hina2cVQo4kWGoLuuig/4Ti3Mraem5ePEx5WnkG8hRb eehfkjt0iACwng+6aXkOuctzMU80kttDv2PROZ3gyBBnOanhwjauGknpeR+3Ox5r1CnE BLQA== X-Gm-Message-State: ALoCoQmxIAPCl/QLWtWZSAyXiQ12b0/HxwAerGS2yzdA1iefWDjPPy8i1BStP5z7gSfvusfuqPsh X-Received: by 10.152.3.131 with SMTP id c3mr17160646lac.4.1433770929297; Mon, 08 Jun 2015 06:42:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.194 with SMTP id v2ls750148lag.59.gmail; Mon, 08 Jun 2015 06:42:09 -0700 (PDT) X-Received: by 10.112.120.162 with SMTP id ld2mr16896950lbb.68.1433770928996; Mon, 08 Jun 2015 06:42:08 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id rd3si2731232lac.167.2015.06.08.06.42.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2015 06:42:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labko7 with SMTP id ko7so97385542lab.2 for ; Mon, 08 Jun 2015 06:42:08 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr16815870lae.19.1433770928422; Mon, 08 Jun 2015 06:42:08 -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 hn6csp1874423lbb; Mon, 8 Jun 2015 06:42:07 -0700 (PDT) X-Received: by 10.70.33.67 with SMTP id p3mr29580407pdi.126.1433770926694; Mon, 08 Jun 2015 06:42:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mb4si4153010pdb.224.2015.06.08.06.42.05; Mon, 08 Jun 2015 06:42:06 -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 S932225AbbFHNmA (ORCPT + 28 others); Mon, 8 Jun 2015 09:42:00 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34207 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752895AbbFHNlZ (ORCPT ); Mon, 8 Jun 2015 09:41:25 -0400 Received: by payr10 with SMTP id r10so98252778pay.1 for ; Mon, 08 Jun 2015 06:41:24 -0700 (PDT) X-Received: by 10.66.221.193 with SMTP id qg1mr29051407pac.134.1433770884589; Mon, 08 Jun 2015 06:41:24 -0700 (PDT) Received: from localhost ([122.167.219.251]) by mx.google.com with ESMTPSA id qp10sm2685670pbc.88.2015.06.08.06.41.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Jun 2015 06:41:23 -0700 (PDT) From: Viresh Kumar To: Thomas Gleixner , Daniel Lezcano Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar , Stephen Warren , Lee Jones Subject: [PATCH 3/6] clocksource: bcm2835: Migrate to new 'set-state' interface Date: Mon, 8 Jun 2015 19:10:44 +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.51 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 bcm2835 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. Cc: Stephen Warren Cc: Lee Jones Signed-off-by: Viresh Kumar Acked-by: Daniel Lezcano --- drivers/clocksource/bcm2835_timer.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/clocksource/bcm2835_timer.c b/drivers/clocksource/bcm2835_timer.c index 26ed331b1aad..b59b8e1ba503 100644 --- a/drivers/clocksource/bcm2835_timer.c +++ b/drivers/clocksource/bcm2835_timer.c @@ -54,19 +54,9 @@ static u64 notrace bcm2835_sched_read(void) return readl_relaxed(system_clock); } -static void bcm2835_time_set_mode(enum clock_event_mode mode, - struct clock_event_device *evt_dev) +static int bcm2835_time_noop(struct clock_event_device *evt) { - switch (mode) { - case CLOCK_EVT_MODE_ONESHOT: - case CLOCK_EVT_MODE_UNUSED: - case CLOCK_EVT_MODE_SHUTDOWN: - case CLOCK_EVT_MODE_RESUME: - break; - default: - WARN(1, "%s: unhandled event mode %d\n", __func__, mode); - break; - } + return 0; } static int bcm2835_time_set_next_event(unsigned long event, @@ -129,7 +119,8 @@ static void __init bcm2835_timer_init(struct device_node *node) timer->evt.name = node->name; timer->evt.rating = 300; timer->evt.features = CLOCK_EVT_FEAT_ONESHOT; - timer->evt.set_mode = bcm2835_time_set_mode; + timer->evt.set_state_shutdown = bcm2835_time_noop; + timer->evt.set_state_oneshot = bcm2835_time_noop; timer->evt.set_next_event = bcm2835_time_set_next_event; timer->evt.cpumask = cpumask_of(0); timer->act.name = node->name;