summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/ioc3.h10
-rw-r--r--include/asm-mips64/m48t35.h32
2 files changed, 41 insertions, 1 deletions
diff --git a/include/asm-mips64/ioc3.h b/include/asm-mips64/ioc3.h
index d8c9cd2ed..ea5b712ba 100644
--- a/include/asm-mips64/ioc3.h
+++ b/include/asm-mips64/ioc3.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: ioc3.h,v 1.1 2000/01/13 00:17:02 ralf Exp $
*
* Copyright (C) 1999 Ralf Baechle
* This file is part of the Linux driver for the SGI IOC3.
@@ -230,6 +230,14 @@ struct ioc3_etxd {
#define ETXD_B2CNT_MASK 0x7ff00000
#define ETXD_B2CNT_SHIFT 20
+/*
+ * Bytebus device space
+ */
+#define IOC3_BYTEBUS_DEV0 0x80000L
+#define IOC3_BYTEBUS_DEV1 0xa0000L
+#define IOC3_BYTEBUS_DEV2 0xc0000L
+#define IOC3_BYTEBUS_DEV3 0xe0000L
+
/* ------------------------------------------------------------------------- */
/* Superio Registers (PIO Access) */
diff --git a/include/asm-mips64/m48t35.h b/include/asm-mips64/m48t35.h
new file mode 100644
index 000000000..113760397
--- /dev/null
+++ b/include/asm-mips64/m48t35.h
@@ -0,0 +1,32 @@
+/*
+ * Registers for the SGS-Thomson M48T35 Timekeeper RAM chip
+ */
+
+#ifndef _ASM_M48T35_H
+#define _ASM_M48T35_H
+
+struct m48t35_rtc {
+ volatile u8 pad[0x7ff8]; /* starts at 0x7ff8 */
+ volatile u8 control;
+ volatile u8 sec;
+ volatile u8 min;
+ volatile u8 hour;
+ volatile u8 day;
+ volatile u8 date;
+ volatile u8 month;
+ volatile u8 year;
+};
+
+#define M48T35_RTC_SET 0x80
+#define M48T35_RTC_STOPPED 0x80
+#define M48T35_RTC_READ 0x40
+
+#ifndef BCD_TO_BIN
+#define BCD_TO_BIN(x) ((x)=((x)&15) + ((x)>>4)*10)
+#endif
+
+#ifndef BIN_TO_BCD
+#define BIN_TO_BCD(x) ((x)=(((x)/10)<<4) + (x)%10)
+#endif
+
+#endif