summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/sgiwd93.h4
-rw-r--r--drivers/sgi/char/sgiserial.c45
2 files changed, 37 insertions, 12 deletions
diff --git a/drivers/scsi/sgiwd93.h b/drivers/scsi/sgiwd93.h
index badcebb7e..075db0904 100644
--- a/drivers/scsi/sgiwd93.h
+++ b/drivers/scsi/sgiwd93.h
@@ -1,4 +1,4 @@
-/* $Id: sgiwd93.h,v 1.2 1997/12/01 18:00:19 ralf Exp $
+/* $Id: sgiwd93.h,v 1.3 1998/03/17 22:12:40 ralf Exp $
* sgiwd93.h: SGI WD93 scsi definitions.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -28,7 +28,7 @@ int wd33c93_reset(Scsi_Cmnd *, unsigned int);
extern struct proc_dir_entry proc_scsi_sgiwd93;
#define SGIWD93_SCSI {proc_dir: &proc_scsi_sgiwd93, \
- name: "GVP Series II SCSI", \
+ name: "SGI WD93", \
detect: sgiwd93_detect, \
release: sgiwd93_release, \
queuecommand: wd33c93_queuecommand, \
diff --git a/drivers/sgi/char/sgiserial.c b/drivers/sgi/char/sgiserial.c
index 12176d6d2..7239e216b 100644
--- a/drivers/sgi/char/sgiserial.c
+++ b/drivers/sgi/char/sgiserial.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
- * $Id$
+ * $Id: sgiserial.c,v 1.8 1998/04/05 11:24:34 ralf Exp $
*/
#include <linux/config.h> /* for CONFIG_REMOTE_DEBUG */
@@ -20,6 +20,7 @@
#include <linux/mm.h>
#include <linux/kernel.h>
#include <linux/delay.h>
+#include <linux/console.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -55,6 +56,19 @@ static int zs_cons_chanout = 0;
static int zs_cons_chanin = 0;
struct sgi_serial *zs_consinfo = 0;
+static struct console sgi_console_driver = {
+ "debug",
+ NULL, /* write */
+ NULL, /* read */
+ NULL, /* device */
+ NULL, /* wait_key */
+ NULL, /* unblank */
+ NULL, /* setup */
+ CON_PRINTBUFFER,
+ -1,
+ 0,
+ NULL
+};
static unsigned char kgdb_regs[16] = {
0, 0, 0, /* write 0, 1, 2 */
(Rx8 | RxENABLE), /* write 3 */
@@ -963,14 +977,14 @@ static void rs_fair_output(void)
/*
* zs_console_print is registered for printk.
*/
-static void zs_console_print(const char *p)
+
+static void zs_console_print(struct console *co, const char *str, unsigned int count)
{
- char c;
- while((c=*(p++)) != 0) {
- if(c == '\n')
+ while(count--) {
+ if(*str == '\n')
rs_put_char('\r');
- rs_put_char(c);
+ rs_put_char(*str++);
}
/* Comment this if you want to have a strict interrupt-driven output */
@@ -1715,7 +1729,7 @@ static inline struct sgi_zslayout *get_zs(int chip)
}
-extern void register_console(void (*proc)(const char *));
+
static inline void
rs_cons_check(struct sgi_serial *ss, int channel)
@@ -1726,6 +1740,7 @@ rs_cons_check(struct sgi_serial *ss, int channel)
i = o = io = 0;
+
/* Is this one of the serial console lines? */
if((zs_cons_chanout != channel) &&
(zs_cons_chanin != channel))
@@ -1733,16 +1748,20 @@ rs_cons_check(struct sgi_serial *ss, int channel)
zs_conschan = ss->zs_channel;
zs_consinfo = ss;
+
/* Register the console output putchar, if necessary */
if((zs_cons_chanout == channel)) {
o = 1;
/* double whee.. */
+
if(!consout_registered) {
- register_console(zs_console_print);
+ sgi_console_driver.write = zs_console_print;
+ register_console(&sgi_console_driver);
consout_registered = 1;
}
}
+
/* If this is console input, we handle the break received
* status interrupt on this line to mean prom_halt().
*/
@@ -1759,6 +1778,7 @@ rs_cons_check(struct sgi_serial *ss, int channel)
panic("Console baud rate weirdness");
}
+
/* Set flag variable for this port so that it cannot be
* opened for other uses by accident.
*/
@@ -1769,9 +1789,11 @@ rs_cons_check(struct sgi_serial *ss, int channel)
printk("zs%d: console I/O\n", ((channel>>1)&1));
msg_printed = 1;
}
+
} else {
printk("zs%d: console %s\n", ((channel>>1)&1),
(i==1 ? "input" : (o==1 ? "output" : "WEIRD")));
+
}
}
@@ -1783,6 +1805,7 @@ int rs_init(void)
int chip, channel, i, flags;
struct sgi_serial *info;
+
/* Setup base handler, and timer table. */
init_bh(SERIAL_BH, do_serial_bh);
timer_table[RS_TIMER].fn = rs_timer;
@@ -1969,6 +1992,7 @@ rs_cons_hook(int chip, int out, int line)
{
int channel;
+
if(chip)
panic("rs_cons_hook called with chip not zero");
if(line != 1 && line != 2)
@@ -1984,10 +2008,11 @@ rs_cons_hook(int chip, int out, int line)
zs_soft[channel].change_needed = 0;
zs_soft[channel].clk_divisor = 16;
zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]);
- if(out)
+ if(out)
zs_cons_chanout = ((chip * 2) + channel);
- else
+ else
zs_cons_chanin = ((chip * 2) + channel);
+
rs_cons_check(&zs_soft[channel], channel);
}