summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2008-10-18 20:28:24 +0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2008-10-18 20:28:24 +0400
commited8c3174dd227031d1f3b9fa4fbb512f8f623434 (patch)
treebac4953f8899d6600f4716c0bcde1e25e34c2591 /arch/mips/include/asm/mach-pb1x00/mc146818rtc.h
parent8aef7e8f8de2d900da892085edbf14ea35fe6881 (diff)
parent0cfd81031a26717fe14380d18275f8e217571615 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/power/Makefile
Diffstat (limited to 'arch/mips/include/asm/mach-pb1x00/mc146818rtc.h')
-rw-r--r--arch/mips/include/asm/mach-pb1x00/mc146818rtc.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h b/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h
new file mode 100644
index 000000000000..622c58710e5b
--- /dev/null
+++ b/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h
@@ -0,0 +1,34 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1998, 2001, 03 by Ralf Baechle
+ *
+ * RTC routines for PC style attached Dallas chip.
+ */
+#ifndef __ASM_MACH_AU1XX_MC146818RTC_H
+#define __ASM_MACH_AU1XX_MC146818RTC_H
+
+#include <asm/io.h>
+#include <asm/mach-au1x00/au1000.h>
+
+#define RTC_PORT(x) (0x0c000000 + (x))
+#define RTC_IRQ 8
+#define PB1500_RTC_ADDR 0x0c000000
+
+static inline unsigned char CMOS_READ(unsigned long offset)
+{
+ offset <<= 2;
+ return (u8)(au_readl(offset + PB1500_RTC_ADDR) & 0xff);
+}
+
+static inline void CMOS_WRITE(unsigned char data, unsigned long offset)
+{
+ offset <<= 2;
+ au_writel(data, offset + PB1500_RTC_ADDR);
+}
+
+#define RTC_ALWAYS_BCD 1
+
+#endif /* __ASM_MACH_AU1XX_MC146818RTC_H */