summaryrefslogtreecommitdiffstats
path: root/arch/mips/ddb5074/time.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-26 00:07:44 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-26 00:07:44 +0000
commit38f0dc890f23f8de14abe63f60a9f9bf3be40271 (patch)
tree99c5b1e021cc51f059d55c7efa4b74f3f4d8a80d /arch/mips/ddb5074/time.c
parent07ebee0bea931f0d373e40205c932cae6b00a86d (diff)
Support for the NEC DDB Vrc-5074 evaluation board. Patches by
Geert Uytterhoeven (geert@linux-m68k.org).
Diffstat (limited to 'arch/mips/ddb5074/time.c')
-rw-r--r--arch/mips/ddb5074/time.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/mips/ddb5074/time.c b/arch/mips/ddb5074/time.c
new file mode 100644
index 000000000..7cc61eea5
--- /dev/null
+++ b/arch/mips/ddb5074/time.c
@@ -0,0 +1,35 @@
+/*
+ * arch.mips/ddb5074/time.c -- Timer routines
+ *
+ * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com>
+ * Sony Suprastructure Center Europe (SUPC-E), Brussels
+ *
+ * $Id*
+ */
+
+#include <linux/init.h>
+#include <asm/mc146818rtc.h>
+
+static unsigned char ddb_rtc_read_data(unsigned long addr)
+{
+ outb_p(addr, RTC_PORT(0));
+ return inb_p(RTC_PORT(1));
+}
+
+static void ddb_rtc_write_data(unsigned char data, unsigned long addr)
+{
+ outb_p(addr, RTC_PORT(0));
+ outb_p(data, RTC_PORT(1));
+}
+
+static int ddb_rtc_bcd_mode(void)
+{
+ return 1;
+}
+
+struct rtc_ops ddb_rtc_ops = {
+ ddb_rtc_read_data,
+ ddb_rtc_write_data,
+ ddb_rtc_bcd_mode
+};
+