From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, linux-sh@vger.kernel.org,
johnstul@us.ibm.com, lethal@linux-sh.org,
Magnus Damm <magnus.damm@gmail.com>,
tglx@linutronix.de
Subject: [PATCH 02/02] clocksource: Start CMT at clocksource resume
Date: Wed, 25 Nov 2009 17:12:55 +0900 [thread overview]
Message-ID: <20091125081255.25416.85126.sendpatchset@rxone.opensource.se> (raw)
In-Reply-To: <20091125081235.25416.32481.sendpatchset@rxone.opensource.se>
From: Magnus Damm <damm@opensource.se>
Add code to start the CMT timer on clocksource resume.
This makes sure the timer is started during sysdev_resume().
Without this patch the clocksource may be read as suspended,
this after sysdev resume but before platform device resume.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/clocksource/sh_cmt.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- 0001/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c 2009-11-25 16:02:52.000000000 +0900
@@ -432,6 +432,13 @@ static void sh_cmt_clocksource_disable(s
sh_cmt_stop(cs_to_sh_cmt(cs), FLAG_CLOCKSOURCE);
}
+static void sh_cmt_clocksource_resume(struct clocksource *cs)
+{
+ struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
+
+ sh_cmt_start(p, FLAG_CLOCKSOURCE);
+}
+
static int sh_cmt_register_clocksource(struct sh_cmt_priv *p,
char *name, unsigned long rating)
{
@@ -442,6 +449,7 @@ static int sh_cmt_register_clocksource(s
cs->read = sh_cmt_clocksource_read;
cs->enable = sh_cmt_clocksource_enable;
cs->disable = sh_cmt_clocksource_disable;
+ cs->resume = sh_cmt_clocksource_resume;
cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8);
cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
pr_info("sh_cmt: %s used as clock source\n", cs->name);
next prev parent reply other threads:[~2009-11-25 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 8:12 [PATCH 00/02] clocksource: SuperH CMT driver resume changes Magnus Damm
2009-11-25 8:12 ` [PATCH 01/02] clocksource: Add argument to resume callback Magnus Damm
2009-11-25 8:12 ` Magnus Damm [this message]
2009-11-28 14:00 ` [PATCH 02/02] clocksource: Start CMT at clocksource resume Thomas Gleixner
2009-11-30 11:19 ` Magnus Damm
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=20091125081255.25416.85126.sendpatchset@rxone.opensource.se \
--to=magnus.damm@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=johnstul@us.ibm.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--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