patch-2.1.80 linux/arch/arm/kernel/oldlatches.c
Next file: linux/arch/arm/kernel/process.c
Previous file: linux/arch/arm/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Tue Jan 20 16:39:41 1998
- Orig file:
v2.1.79/linux/arch/arm/kernel/oldlatches.c
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.1.79/linux/arch/arm/kernel/oldlatches.c linux/arch/arm/kernel/oldlatches.c
@@ -0,0 +1,53 @@
+/* Support for the latches on the old Archimedes which control the floppy,
+ * hard disc and printer
+ *
+ * (c) David Alan Gilbert 1995/1996
+ */
+#include <linux/kernel.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+
+#ifdef LATCHAADDR
+/*
+ * They are static so that everyone who accesses them has to go through here
+ */
+static unsigned char LatchACopy;
+
+/* newval=(oldval & ~mask)|newdata */
+void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
+{
+ LatchACopy=(LatchACopy & ~mask)|newdata;
+ outb(LatchACopy, LATCHAADDR);
+#ifdef DEBUG
+ printk("oldlatch_A:0x%2x\n",LatchACopy);
+#endif
+
+}
+#endif
+
+#ifdef LATCHBADDR
+static unsigned char LatchBCopy;
+
+/* newval=(oldval & ~mask)|newdata */
+void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
+{
+ LatchBCopy=(LatchBCopy & ~mask)|newdata;
+ outb(LatchBCopy, LATCHBADDR);
+#ifdef DEBUG
+ printk("oldlatch_B:0x%2x\n",LatchBCopy);
+#endif
+}
+#endif
+
+void oldlatch_init(void)
+{
+ printk("oldlatch: init\n");
+#ifdef LATCHAADDR
+ oldlatch_aupdate(0xff,0xff);
+#endif
+#ifdef LATCHBADDR
+ oldlatch_bupdate(0xff,0x8); /* Thats no FDC reset...*/
+#endif
+ return ;
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov