mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sugaya Taichi <sugaya.taichi@socionext.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Cc: Takao Orito <orito.takao@socionext.com>,
	Kazuhiro Kasai <kasai.kazuhiro@socionext.com>,
	Shinji Kanematsu <kanematsu.shinji@socionext.com>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Masami Hiramatsu <masami.hiramatsu@linaro.org>,
	Sugaya Taichi <sugaya.taichi@socionext.com>
Subject: [PATCH 2/3] clocksource/drivers/timer-milbeaut: Add shutdown function
Date: Mon, 25 Mar 2019 12:05:48 +0900	[thread overview]
Message-ID: <1553483149-8922-3-git-send-email-sugaya.taichi@socionext.com> (raw)
In-Reply-To: <1553483149-8922-1-git-send-email-sugaya.taichi@socionext.com>

Add a shutdown operation to support shutdown timer.

Signed-off-by: Sugaya Taichi <sugaya.taichi@socionext.com>
---
 drivers/clocksource/timer-milbeaut.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/clocksource/timer-milbeaut.c b/drivers/clocksource/timer-milbeaut.c
index 9fd5d08..f478061 100644
--- a/drivers/clocksource/timer-milbeaut.c
+++ b/drivers/clocksource/timer-milbeaut.c
@@ -85,6 +85,15 @@ static int mlb_set_state_oneshot(struct clock_event_device *clk)
 	return 0;
 }
 
+static int mlb_set_state_shutdown(struct clock_event_device *clk)
+{
+	struct timer_of *to = to_timer_of(clk);
+	u32 val = MLB_TMR_TMCSR_CSL_DIV2;
+
+	writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
+	return 0;
+}
+
 static int mlb_clkevt_next_event(unsigned long event,
 				   struct clock_event_device *clk)
 {
@@ -125,6 +134,7 @@ static int mlb_config_clock_event(struct timer_of *to)
 		.features = CLOCK_EVT_FEAT_DYNIRQ | CLOCK_EVT_FEAT_ONESHOT,
 		.set_state_oneshot = mlb_set_state_oneshot,
 		.set_state_periodic = mlb_set_state_periodic,
+		.set_state_shutdown = mlb_set_state_shutdown,
 		.set_next_event = mlb_clkevt_next_event,
 	},
 
-- 
1.9.1


  parent reply	other threads:[~2019-03-25  3:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25  3:05 [PATCH 0/3] Bugfix and cleanup the timer driver for Milbeaut M10V Sugaya Taichi
2019-03-25  3:05 ` [PATCH 1/3] clocksource/drivers/timer-milbeaut: Fix to enable one-shot timer Sugaya Taichi
2019-04-11 20:08   ` Daniel Lezcano
2019-04-12  4:32     ` Sugaya, Taichi
2019-03-25  3:05 ` Sugaya Taichi [this message]
2019-03-25  3:05 ` [PATCH 3/3] clocksource/drivers/timer-milbeaut: Cleanup common register accesses Sugaya Taichi
2019-04-11  7:11 ` [PATCH 0/3] Bugfix and cleanup the timer driver for Milbeaut M10V Sugaya, Taichi
2019-04-11 20:14   ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1553483149-8922-3-git-send-email-sugaya.taichi@socionext.com \
    --to=sugaya.taichi@socionext.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=kanematsu.shinji@socionext.com \
    --cc=kasai.kazuhiro@socionext.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu@linaro.org \
    --cc=orito.takao@socionext.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®