From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] clocksource: sh_cmt: 32-bit control register access prototype
Date: Fri, 14 Dec 2012 05:55:53 +0000 [thread overview]
Message-ID: <20121214060026.10668.35031.sendpatchset@w520> (raw)
From: Magnus Damm <damm@opensource.se>
This is a 32-bit control register access prototype
for the CMT driver. It is not ready for merge but
it intends to show the reasoning behind the
register access patches included in this series:
"[PATCH 00/08] clocksource: sh_cmt: CMT driver update"
Not-Yet-Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/clocksource/sh_cmt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
--- 0006/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c 2012-12-14 11:53:23.000000000 +0900
@@ -79,6 +79,12 @@ struct sh_cmt_priv {
* CMCSR 0xffca0060 16-bit
* CMCNT 0xffca0064 32-bit
* CMCOR 0xffca0068 32-bit
+ *
+ * "32-bit counter and 32-bit control"
+ * CMSTR 0xe6130000 32-bit
+ * CMCSR 0xe6130010 32-bit
+ * CMCNT 0xe6130014 32-bit
+ * CMCOR 0xe6130018 32-bit
*/
static unsigned long sh_cmt_read16(void __iomem *base, unsigned long offs)
@@ -734,8 +740,13 @@ static int sh_cmt_setup(struct sh_cmt_pr
goto err1;
}
+#if 1 /* XXX: filthy prototype hack! */
+ p->read_control = sh_cmt_read32;
+ p->write_control = sh_cmt_write32;
+#else
p->read_control = sh_cmt_read16;
p->write_control = sh_cmt_write16;
+#endif
if (resource_size(res) = 6) {
p->width = 16;
next reply other threads:[~2012-12-14 5:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 5:55 Magnus Damm [this message]
2013-06-17 6:40 ` [PATCH] clocksource: sh_cmt: 32-bit control register support Magnus Damm
2013-06-17 18:37 ` Laurent Pinchart
2013-06-18 5:39 ` Magnus Damm
2013-06-18 10:35 ` Laurent Pinchart
2013-06-18 11:54 ` Magnus Damm
2013-06-18 12:30 ` Laurent Pinchart
2013-06-18 13:27 ` Magnus Damm
2013-06-19 12:31 ` Simon Horman
2013-06-19 12:58 ` Laurent Pinchart
2013-06-20 12:30 ` Simon Horman
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=20121214060026.10668.35031.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).