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: 6565341 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8A36F9F1C1 for ; Mon, 8 Jun 2015 13:45:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AC65203E3 for ; Mon, 8 Jun 2015 13:45:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0BAD203B8 for ; Mon, 8 Jun 2015 13:44:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z1xJy-0005op-UZ; Mon, 08 Jun 2015 13:42:34 +0000 Received: from mail-pd0-f175.google.com ([209.85.192.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z1xJB-0005SV-Ot for linux-arm-kernel@lists.infradead.org; Mon, 08 Jun 2015 13:41:46 +0000 Received: by pdjn11 with SMTP id n11so67263859pdj.0 for ; Mon, 08 Jun 2015 06:41:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=am6W92Xz89YJ4Ff5W1hX/0z0RQLzRPTRz4dvY4+7dxg=; b=a9T0kc2KIvxlX52UOp37ZOzdIWFecdXwOcsG0iSbSkLkr5QYD0j6G/sadygLbJERbV xSCNBZD2a4/Ex+uWubEHke9BtIim2bE2HSkX4DgNOzOns9YETtEWAof7Jz2tVp9JY5AC swdxrKEQ/SYfwQrFJP2gWhT96J5ashBqaWzDP+E+Z5q50LiGFZfQzUaauZEBxZXphzsh AwXPPv0IYGdXTVZAe4yMu5p3KqOhijBbFlEE8y3YVHErCStcHALC86fmRvd8HSR9bsFk 4p9wyo4wPA4OV9Y+PAGKLusn85AZCK+0gr0Wg36D99cDul7K1Fz4ut7lFaXYPBH150mU 6gXA== X-Gm-Message-State: ALoCoQmysq8NPy3A9xwwYw035ymrF+ATB4csF847PIbH3Bqm/TaSrpNrkoAWDt50eKM1Xu/aZ6UT 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 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150608_064145_900504_D8AFA46D X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -1.8 (-) Cc: linaro-kernel@lists.linaro.org, Stephen Warren , Viresh Kumar , Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;