From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/8] ARM/Samsung: adapt the generic timer driver to support the S3C6410 SoC
Date: Sat, 21 Jul 2012 12:04:27 +0200 [thread overview]
Message-ID: <1342865073-5209-3-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1342865073-5209-1-git-send-email-jbe@pengutronix.de>
The S3C64XX SoC has a real 32 bit counter, but almost the same style of
registers. It's enough to change the parameters, to get the routines work on
this SoC.
TODO: what about the S5P SoCs?
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
arch/arm/mach-samsung/s3c-timer.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-samsung/s3c-timer.c b/arch/arm/mach-samsung/s3c-timer.c
index 6665c8c..271f97d 100644
--- a/arch/arm/mach-samsung/s3c-timer.c
+++ b/arch/arm/mach-samsung/s3c-timer.c
@@ -37,11 +37,20 @@
#define S3C_TCNTB4 (S3C_TIMER_BASE + 0x3c)
#define S3C_TCNTO4 (S3C_TIMER_BASE + 0x40)
-#define TIMER_WIDTH 16
-#define TIMER_SHIFT 10
-#define PRE_MUX 3
-#define PRE_MUX_ADD 1
+#ifdef CONFIG_ARCH_S3C24xx
+# define TIMER_WIDTH 16
+# define TIMER_SHIFT 10
+# define PRE_MUX 3
+# define PRE_MUX_ADD 1
static const uint32_t max = 0x0000ffff;
+#endif
+#ifdef CONFIG_ARCH_S3C64xx
+# define TIMER_WIDTH 32
+# define TIMER_SHIFT 10
+# define PRE_MUX 4
+# define PRE_MUX_ADD 0
+static const uint32_t max = ~0;
+#endif
static void s3c_init_t4_clk_source(void)
{
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-07-21 10:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 10:04 [PATCH] Addd the Samsung S3C6410 SoC to Barebox Juergen Beisert
2012-07-21 10:04 ` [PATCH 1/8] ARM/Samsung: add S3C6410 SoC iomap Juergen Beisert
2012-07-21 10:04 ` Juergen Beisert [this message]
2012-07-21 10:04 ` [PATCH 3/8] ARM/Samsung: add the clock tree support for the S3C6410 SoC Juergen Beisert
2012-07-21 10:04 ` [PATCH 4/8] ARM/Samsung: add GPIO handling " Juergen Beisert
2012-07-21 10:04 ` [PATCH 5/8] ARM/Samsung: add generic S3C6410 SoC specific functions Juergen Beisert
2012-07-21 10:04 ` [PATCH 6/8] ARM/Samsung: add the S3C6410 SoC Juergen Beisert
2012-07-21 10:04 ` [PATCH 7/8] ARM/Samsung: add the Mini6410 platform as the first user of " Juergen Beisert
2012-07-21 10:04 ` [PATCH 8/8] ARM/Samsung: add the Tiny6410 platform as the second " Juergen Beisert
2012-07-28 15:10 [PATCHv2] Add the Samsung S3C6410 SoC to Barebox Juergen Beisert
2012-07-28 15:10 ` [PATCH 2/8] ARM/Samsung: adapt the generic timer driver to support the S3C6410 SoC Juergen Beisert
2012-07-28 15:29 ` Juergen Beisert
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=1342865073-5209-3-git-send-email-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=barebox@lists.infradead.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