aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32/include/mach/regs-rtc.h
diff options
context:
space:
mode:
authorGuanXuetao <gxt@mprc.pku.edu.cn>2011-02-26 20:08:36 +0800
committerGuanXuetao <gxt@mprc.pku.edu.cn>2011-03-17 09:19:14 +0800
commitb08b4f8e63e60a64f81e194269be14afee396f33 (patch)
treed76aef05929a7f28f1463c72adefd8af780192c8 /arch/unicore32/include/mach/regs-rtc.h
parentunicore32 machine related files: core files (diff)
downloadlinux-dev-b08b4f8e63e60a64f81e194269be14afee396f33.tar.xz
linux-dev-b08b4f8e63e60a64f81e194269be14afee396f33.zip
unicore32 machine related files: hardware registers
This patch adds all hardware registers definitions. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'arch/unicore32/include/mach/regs-rtc.h')
-rw-r--r--arch/unicore32/include/mach/regs-rtc.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/unicore32/include/mach/regs-rtc.h b/arch/unicore32/include/mach/regs-rtc.h
new file mode 100644
index 000000000000..155e38757186
--- /dev/null
+++ b/arch/unicore32/include/mach/regs-rtc.h
@@ -0,0 +1,37 @@
+/*
+ * PKUnity Real-Time Clock (RTC) control registers
+ */
+/*
+ * RTC Alarm Reg RTC_RTAR
+ */
+#define RTC_RTAR __REG(PKUNITY_RTC_BASE + 0x0000)
+/*
+ * RTC Count Reg RTC_RCNR
+ */
+#define RTC_RCNR __REG(PKUNITY_RTC_BASE + 0x0004)
+/*
+ * RTC Trim Reg RTC_RTTR
+ */
+#define RTC_RTTR __REG(PKUNITY_RTC_BASE + 0x0008)
+/*
+ * RTC Status Reg RTC_RTSR
+ */
+#define RTC_RTSR __REG(PKUNITY_RTC_BASE + 0x0010)
+
+/*
+ * ALarm detected RTC_RTSR_AL
+ */
+#define RTC_RTSR_AL FIELD(1, 1, 0)
+/*
+ * 1 Hz clock detected RTC_RTSR_HZ
+ */
+#define RTC_RTSR_HZ FIELD(1, 1, 1)
+/*
+ * ALarm interrupt Enable RTC_RTSR_ALE
+ */
+#define RTC_RTSR_ALE FIELD(1, 1, 2)
+/*
+ * 1 Hz clock interrupt Enable RTC_RTSR_HZE
+ */
+#define RTC_RTSR_HZE FIELD(1, 1, 3)
+