Update of /cvsroot/linux-vax/kernel-2.4/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv25353/drivers/char
Modified Files:
dz.c dz.h
Log Message:
Bring forward all 2.2 work from before new year. This should give us
all a (somewhat) bootable kernel.
Index: dz.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dz.c 2001/01/18 15:52:27 1.2
+++ dz.c 2001/01/26 00:27:00 1.3
@@ -1,5 +1,5 @@
/*
- * dz.c: Serial port driver for DECStations equiped
+ * dz.c: Serial port driver for DECStations & VAXstations equiped
* with the DZ chipset.
*
* Copyright (C) 1998 Olivier A. D. Lebaillif
@@ -19,7 +19,7 @@
* [07-SEP-99] Bugfixes
*/
-#define DEBUG_DZ 1
+/* #define DEBUG_DZ 1 */
#ifdef MODULE
#include <linux/module.h>
@@ -283,16 +283,22 @@
if (tmp & DZ_PERR)
{
*tty->flip.flag_buf_ptr = TTY_PARITY;
+#ifdef DEBUG_DZ
debug_console("PERR\n",5);
+#endif
}
else if (tmp & DZ_FERR)
{
*tty->flip.flag_buf_ptr = TTY_FRAME;
+#ifdef DEBUG_DZ
debug_console("FERR\n",5);
+#endif
}
if (tmp & DZ_OERR)
{
+#ifdef DEBUG_DZ
debug_console("OERR\n",5);
+#endif
if (tty->flip.count < TTY_FLIPBUF_SIZE) {
tty->flip.count++;
tty->flip.flag_buf_ptr++;
@@ -1526,7 +1532,7 @@
}
switch(parity) {
case 'o': case 'O':
- cflag |= DZ_PARODD;
+ cflag |= DZ_PARODD | PARENB;
break;
case 'e': case 'E':
cflag |= DZ_PARENB;
@@ -1545,8 +1551,10 @@
dz_console->port = KN02_DZ11_BASE;
#endif
dz_console->line = CONSOLE_LINE;
+
+ /* This line locks up Dave Airlie's VS3100m38 after HALT */
+ /* dz_out(dz_console, DZ_CSR, DZ_CLR); */
- dz_out(dz_console, DZ_CSR, DZ_CLR);
while ((tmp = dz_in(dz_console,DZ_CSR)) & DZ_CLR)
;
@@ -1554,10 +1562,7 @@
dz_out(dz_console, DZ_CSR, DZ_MSE);
/* Set up flags... */
- dz_console->cflags = 0;
- dz_console->cflags |= DZ_B9600;
- dz_console->cflags |= DZ_CS8;
- dz_console->cflags |= DZ_PARENB;
+ dz_console->cflags = co->cflag;
dz_out (dz_console, DZ_LPR, dz_console->cflags);
mask = 1 << dz_console->line;
@@ -1566,7 +1571,6 @@
tmp |= mask; /* set the TX flag */
dz_out (dz_console, DZ_TCR, tmp);
}
-
return 0;
}
Index: dz.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dz.h 2001/01/14 17:57:08 1.1.1.1
+++ dz.h 2001/01/26 00:27:00 1.2
@@ -1,5 +1,5 @@
/*
- * dz.h: Serial port driver for DECStations equiped
+ * dz.h: Serial port driver for DECStations and VAXstations equiped
* with the DZ chipset.
*
* Copyright (C) 1998 Olivier A. D. Lebaillif
@@ -10,6 +10,8 @@
#ifndef DZ_SERIAL_H
#define DZ_SERIAL_H
+#include <linux/config.h>
+
/*
* Definitions for the Control and Status Received.
*/
@@ -98,13 +100,21 @@
/*
* Addresses for the DZ registers
*/
+#ifdef CONFIG_VAX
+#define DZ_CSR 0x00 /* Control and Status Register */
+#define DZ_RBUF 0x04 /* Receive Buffer */
+#define DZ_LPR 0x04 /* Line Parameters Register */
+#define DZ_TCR 0x08 /* Transmitter Control Register */
+#define DZ_MSR 0x0c /* Modem Status Register */
+#define DZ_TDR 0x0c /* Transmit Data Register */
+#else
#define DZ_CSR 0x00 /* Control and Status Register */
#define DZ_RBUF 0x08 /* Receive Buffer */
#define DZ_LPR 0x08 /* Line Parameters Register */
#define DZ_TCR 0x10 /* Transmitter Control Register */
#define DZ_MSR 0x18 /* Modem Status Register */
#define DZ_TDR 0x18 /* Transmit Data Register */
-
+#endif
#define DZ_NB_PORT 4
|