From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 05/12] clocksource: samsung-time: Use local register definitions
Date: Sat, 9 Mar 2013 21:23:14 +0100 [thread overview]
Message-ID: <1362860601-18464-6-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1362860601-18464-1-git-send-email-tomasz.figa@gmail.com>
This patch copies PWM timer register definitions to samsung-time.c. The
original header in plat is being kept for now, since it is also used by
other code that also needs to be reworked to be multiplatform-friendly.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
drivers/clocksource/samsung-time.c | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/samsung-time.c b/drivers/clocksource/samsung-time.c
index 03955fb..259ce25 100644
--- a/drivers/clocksource/samsung-time.c
+++ b/drivers/clocksource/samsung-time.c
@@ -26,7 +26,41 @@
#include <mach/map.h>
#include <plat/devs.h>
-#include <plat/regs-timer.h>
+
+#define S3C_TIMERREG(x) (S3C_VA_TIMER + (x))
+#define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c))
+
+#define S3C2410_TCON S3C_TIMERREG(0x08)
+#define S3C64XX_TINT_CSTAT S3C_TIMERREG(0x44)
+
+/* for each timer, we have an count buffer, an compare buffer and
+ * an observation buffer
+*/
+
+/* WARNING - timer 4 has no buffer reg, and it's observation is at +4 */
+
+#define S3C2410_TCNTB(tmr) S3C_TIMERREG2(tmr, 0x00)
+#define S3C2410_TCMPB(tmr) S3C_TIMERREG2(tmr, 0x04)
+
+#define S3C2410_TCON_T4RELOAD (1<<22)
+#define S3C2410_TCON_T4MANUALUPD (1<<21)
+#define S3C2410_TCON_T4START (1<<20)
+
+#define S3C2410_TCON_T3RELOAD (1<<19)
+#define S3C2410_TCON_T3MANUALUPD (1<<17)
+#define S3C2410_TCON_T3START (1<<16)
+
+#define S3C2410_TCON_T2RELOAD (1<<15)
+#define S3C2410_TCON_T2MANUALUPD (1<<13)
+#define S3C2410_TCON_T2START (1<<12)
+
+#define S3C2410_TCON_T1RELOAD (1<<11)
+#define S3C2410_TCON_T1MANUALUPD (1<<9)
+#define S3C2410_TCON_T1START (1<<8)
+
+#define S3C2410_TCON_T0RELOAD (1<<3)
+#define S3C2410_TCON_T0MANUALUPD (1<<1)
+#define S3C2410_TCON_T0START (1<<0)
static struct clk *tin_event;
static struct clk *tin_source;
--
1.8.1.5
next prev parent reply other threads:[~2013-03-09 20:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-09 20:23 [PATCH v3 00/12] ARM: samsung-time: Prepare for multiplatform support Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 01/12] ARM: SAMSUNG: Move samsung-time to drivers/clocksource Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 02/12] clocksource: samsung-time: Set platform-specific parameters at runtime Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 03/12] clocksource: samsung-time: Drop useless defines from public header Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 04/12] ARM: SAMSUNG: Move samsung-time.h header to inlude/clocksource Tomasz Figa
2013-03-09 20:23 ` Tomasz Figa [this message]
2013-03-09 20:23 ` [PATCH v3 06/12] clocksource: samsung-time: Remove use of static register mapping Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 07/12] clocksource: samsung-time: Use clk_get_sys for getting clocks Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 08/12] ARM: SAMSUNG: devs: Drop unnecessary IRQ resources of timer devices Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 09/12] clocksource: samsung-time: Do not use static IRQ definition Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 10/12] clocksource: samsung-time: Move IRQ mask/ack handling to the driver Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 11/12] ARM: SAMSUNG: Remove unused PWM timer IRQ chip code Tomasz Figa
2013-03-09 20:23 ` [PATCH v3 12/12] clocksource: samsung-time: Add Device Tree support Tomasz Figa
2013-03-28 12:30 ` Mark Brown
2013-03-23 12:27 ` [PATCH v3 00/12] ARM: samsung-time: Prepare for multiplatform support Tomasz Figa
2013-03-28 13:02 ` Mark Brown
2013-03-28 22:29 ` Tomasz Figa
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=1362860601-18464-6-git-send-email-tomasz.figa@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).