linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource: sh_cmt: 32-bit control register access prototype
@ 2012-12-14  5:55 Magnus Damm
  2013-06-17  6:40 ` [PATCH] clocksource: sh_cmt: 32-bit control register support Magnus Damm
  0 siblings, 1 reply; 11+ messages in thread
From: Magnus Damm @ 2012-12-14  5:55 UTC (permalink / raw)
  To: linux-sh

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;

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-06-20 12:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14  5:55 [PATCH] clocksource: sh_cmt: 32-bit control register access prototype Magnus Damm
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

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).