From patchwork Mon Aug 10 09:51:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 52208 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 7532C2152A for ; Mon, 10 Aug 2015 10:10:01 +0000 (UTC) Received: by labd1 with SMTP id d1sf15775541lab.0 for ; Mon, 10 Aug 2015 03:10:00 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=z6zRocOJFVFwvLwhFchgV67bFGu5j+AtKLgwbYl4FQA=; b=PHiWaRhjQFhp6lS7DKff2NJfk6qSH3WTqpZX9qIYxw2YMqzvBcj0Whc9yKyl6nRIYE ejErmVKYrgHfmJuKLHQiYLFuPa01ya8z9yeEN564z5HjOxki3/bZUtIuaW1cZ4NA4hZf F7DrccieavxSHhPqkHj+DB0mGIrQRIlgN/39nywUpnm9ArPWgNfmjOX8NGHPhdLPW41n yf1Y0Fo97jEYUCHFqwRg6Mg075KnPdNoaQsYC7H/FYPlvD+x28xSbnf6FnBAZlqtudei EIMFs11UZqFkRKvEVICtzrHcCp+rJugsSCGusxfmJ4wEb3OHA26HqGWbPZfXF2BvwtYV A4ew== X-Gm-Message-State: ALoCoQlcVGEUmSWEaVO8PrvZDo2GxHRGC3nwcSDPZE8ZL1VLBPQrJNgjucj9eVpnvyjXQhmuwaUQ X-Received: by 10.180.89.104 with SMTP id bn8mr79205wib.4.1439201400331; Mon, 10 Aug 2015 03:10:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.36 with SMTP id v4ls29490laj.109.gmail; Mon, 10 Aug 2015 03:10:00 -0700 (PDT) X-Received: by 10.152.170.195 with SMTP id ao3mr17602753lac.30.1439201400119; Mon, 10 Aug 2015 03:10:00 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id 9si13730167lao.146.2015.08.10.03.10.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 03:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lagz9 with SMTP id z9so50827190lag.3 for ; Mon, 10 Aug 2015 03:10:00 -0700 (PDT) X-Received: by 10.112.129.137 with SMTP id nw9mr13318722lbb.19.1439201399963; Mon, 10 Aug 2015 03:09:59 -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.7.198 with SMTP id l6csp1835572lba; Mon, 10 Aug 2015 03:09:58 -0700 (PDT) X-Received: by 10.70.54.196 with SMTP id l4mr42925567pdp.42.1439201398069; Mon, 10 Aug 2015 03:09:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ek3si32354336pbd.51.2015.08.10.03.09.57; Mon, 10 Aug 2015 03:09:58 -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 S933533AbbHJKJz (ORCPT + 28 others); Mon, 10 Aug 2015 06:09:55 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:36191 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932985AbbHJJxy (ORCPT ); Mon, 10 Aug 2015 05:53:54 -0400 Received: by wicja10 with SMTP id ja10so30305472wic.1 for ; Mon, 10 Aug 2015 02:53:53 -0700 (PDT) X-Received: by 10.194.59.237 with SMTP id c13mr45430992wjr.24.1439200433317; Mon, 10 Aug 2015 02:53:53 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id jr5sm28598154wjc.14.2015.08.10.02.53.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 02:53:52 -0700 (PDT) From: Daniel Lezcano To: mingo@kernel.org Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, Viresh Kumar , James Hogan , linux-metag@vger.kernel.org (open list:METAG ARCHITECTURE) Subject: [PATCH 19/74] clockevents/drivers/metag_generic: Migrate to new 'set-state' interface Date: Mon, 10 Aug 2015 11:51:36 +0200 Message-Id: <1439200352-26767-19-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> References: <55C87382.4070309@linaro.org> <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> 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: daniel.lezcano@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.53 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: , From: Viresh Kumar Migrate metag_generic 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. We weren't doing anything in the ->set_mode() callback. Even the WARN() for periodic or unused modes isn't required anymore as the core is taking care of that now. So, this patch doesn't provide any set-state callbacks. Cc: James Hogan Signed-off-by: Viresh Kumar Signed-off-by: Daniel Lezcano --- drivers/clocksource/metag_generic.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/clocksource/metag_generic.c b/drivers/clocksource/metag_generic.c index b7384b8..bcd5c0d 100644 --- a/drivers/clocksource/metag_generic.c +++ b/drivers/clocksource/metag_generic.c @@ -56,25 +56,6 @@ static int metag_timer_set_next_event(unsigned long delta, return 0; } -static void metag_timer_set_mode(enum clock_event_mode mode, - struct clock_event_device *evt) -{ - switch (mode) { - case CLOCK_EVT_MODE_ONESHOT: - case CLOCK_EVT_MODE_RESUME: - break; - - case CLOCK_EVT_MODE_SHUTDOWN: - /* We should disable the IRQ here */ - break; - - case CLOCK_EVT_MODE_PERIODIC: - case CLOCK_EVT_MODE_UNUSED: - WARN_ON(1); - break; - }; -} - static cycle_t metag_clocksource_read(struct clocksource *cs) { return __core_reg_get(TXTIMER); @@ -129,7 +110,6 @@ static void arch_timer_setup(unsigned int cpu) clk->rating = 200, clk->shift = 12, clk->irq = tbisig_map(TBID_SIGNUM_TRT), - clk->set_mode = metag_timer_set_mode, clk->set_next_event = metag_timer_set_next_event, clk->mult = div_sc(hwtimer_freq, NSEC_PER_SEC, clk->shift);