patch-2.1.29 linux/drivers/sbus/char/sunserial.c

Next file: linux/drivers/sbus/dvma.c
Previous file: linux/drivers/sbus/char/sunmouse.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.28/linux/drivers/sbus/char/sunserial.c linux/drivers/sbus/char/sunserial.c
@@ -1,4 +1,4 @@
-/* $Id: sunserial.c,v 1.25 1996/12/30 07:50:26 davem Exp $
+/* $Id: sunserial.c,v 1.27 1997/03/04 19:33:55 davem Exp $
  * serial.c: Serial port driver for the Sparc.
  *
  * Copyright (C) 1995 David S. Miller ([email protected])
@@ -1736,7 +1736,7 @@
 
 static void show_serial_version(void)
 {
-	char *revision = "$Revision: 1.25 $";
+	char *revision = "$Revision: 1.27 $";
 	char *version, *p;
 
 	version = strchr(revision, ' ');
@@ -2091,6 +2091,19 @@
 extern void keyboard_zsinit(void);
 extern void sun_mouse_zsinit(void);
 
+/* This is for the auto baud rate detection in the mouse driver. */
+void zs_change_mouse_baud(int newbaud)
+{
+	int channel = MOUSE_LINE;
+	int brg;
+
+	zs_soft[channel].zs_baud = newbaud;
+	brg = BPS_TO_BRG(zs_soft[channel].zs_baud,
+			 (ZS_CLOCK / zs_soft[channel].clk_divisor));
+	write_zsreg(zs_soft[channel].zs_channel, R12, (brg & 0xff));
+	write_zsreg(zs_soft[channel].zs_channel, R13, ((brg >> 8) & 0xff));
+}
+
 __initfunc(unsigned long sun_serial_setup (unsigned long memory_start))
 {
 	char *p;
@@ -2152,6 +2165,7 @@
 	
 	memset(&serial_driver, 0, sizeof(struct tty_driver));
 	serial_driver.magic = TTY_DRIVER_MAGIC;
+	serial_driver.driver_name = "serial";
 	serial_driver.name = "ttyS";
 	serial_driver.major = TTY_MAJOR;
 	serial_driver.minor_start = 64;
@@ -2183,6 +2197,10 @@
 	serial_driver.start = rs_start;
 	serial_driver.hangup = rs_hangup;
 
+	/* I'm too lazy, someone write versions of this for us. -DaveM */
+	serial_driver.read_proc = 0;
+	serial_driver.proc_entry = 0;
+
 	init_zscons_termios(&serial_driver.init_termios);
 
 	/*
@@ -2308,7 +2326,7 @@
 			write_zsreg(zs_soft[channel].zs_channel, R11,
 				    (TCBR | RCBR));
 
-			zs_soft[channel].zs_baud = 1200;
+			zs_soft[channel].zs_baud = 4800;
 			brg = BPS_TO_BRG(zs_soft[channel].zs_baud,
 					 ZS_CLOCK/zs_soft[channel].clk_divisor);
 			write_zsreg(zs_soft[channel].zs_channel, R12,

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]