Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1185743
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Viresh Kumar <viresh.kumar@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 06/23] cris/time: Migrate to new 'set-state' interface |
| Date | Thu, 16 Jul 2015 13:30:01 +0200 |
| Message-ID | <pMPwt-5cU-11@gated-at.bofh.it> (permalink) |
| References | <pMPwt-5cU-9@gated-at.bofh.it> |
| X-Original-To | Thomas Gleixner <tglx@linutronix.de>, Daniel Lezcano <daniel.lezcano@linaro.org> |
| 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=RM9nPbaNUePqJs0ZB5/BD2dRVqQ8lmn5JWjFe16aIjs=; b=e5UAhBX+flagKjIPbeqwMeKw5OvyQFbAgXdoSss4wAF9rdzrPk6/K3vdt//RHH1uzc kKccySMBmFBffXNsPWYg3ZV2PR6lp+0YFjEfQHK5YLt958k09gmswPpgq8q8524toNLy 4ICXgV4XD7ibWqR/uMbsXSkhqexF1ddV179NnJeoOZdVtTutfnGZ+kIchsB/Nr+D5uUf dxuj6XkZUCiMDI76AI1hv98+G84wJEb6pZ1qZCPtfchwKHt38W6M/+hsj+4pu5JYpOUv gOmRNPqKwFHlBsqh2vbM7OQJauhKt7UcjVsZjsMM7Knr8j864Z5CG393p7McfAixMIcc iISg== |
| X-Gm-Message-State | ALoCoQnc4fehjc183Q2QA4fshBi9I21K3a6+gB/ICQJ9AVinVVhDWnFED73jP32epPG6o+L/Hxhb |
| X-Received | by 10.68.206.7 with SMTP id lk7mr17541285pbc.52.1437046053342; Thu, 16 Jul 2015 04:27:33 -0700 (PDT) |
| X-Mailer | git-send-email 2.4.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 58 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>, Mikael Starvik <starvik@axis.com>, Jesper Nilsson <jesper.nilsson@axis.com>, Rabin Vincent <rabin@rab.in>, Guenter Roeck <linux@roeck-us.net>, linux-cris-kernel@axis.com |
| X-Original-Date | Thu, 16 Jul 2015 16:56:18 +0530 |
| X-Original-Message-ID | <f23fb94e57d6d5898de6a54fd2273b7a8d478e5c.1437044517.git.viresh.kumar@linaro.org> |
| X-Original-References | <cover.1437044517.git.viresh.kumar@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1185743 |
Show key headers only | View raw
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 <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Rabin Vincent <rabin@rab.in>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
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,
};
--
2.4.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 06/23] cris/time: Migrate to new 'set-state' interface Viresh Kumar <viresh.kumar@linaro.org> - 2015-07-16 13:30 +0200
csiph-web