|
From: Andy P. <at...@us...> - 2002-04-11 14:36:32
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char
In directory usw-pr-cvs1:/tmp/cvs-serv8509/sgi/char
Modified Files:
Makefile ds1286.c graphics.c newport.c rrm.c sgicons.c
sgiserial.c sgiserial.h shmiq.c streamable.c usema.c
Removed Files:
graphics_syms.c linux_logo.h
Log Message:
synch 2.4.15 commit 52
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Makefile 14 Jan 2001 18:57:55 -0000 1.1.1.1
+++ Makefile 11 Apr 2002 12:55:55 -0000 1.2
@@ -8,25 +8,12 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := sgichar.o
-OX_OBJS := newport.o
-O_OBJS := sgicons.o \
- usema.o shmiq.o streamable.o
-ifeq ($(CONFIG_SGI_SERIAL),y)
- O_OBJS += sgiserial.o
-endif
+export-objs := newport.o shmiq.o sgicons.o usema.o
+obj-y := newport.o shmiq.o sgicons.o usema.o streamable.o
-ifeq ($(CONFIG_SGI_DS1286),y)
- O_OBJS += ds1286.o
-endif
-
-ifeq ($(CONFIG_SGI_NEWPORT_GFX),y)
- O_OBJS += graphics.o rrm.o
-else
-ifeq ($(CONFIG_SGI_NEWPORT_GFX),m)
- OX_OBJS += graphics_syms.o
- MX_OBJS += graphics.o rrm.o
-endif
-endif
+obj-$(CONFIG_SGI_SERIAL) += sgiserial.o
+obj-$(CONFIG_SGI_DS1286) += ds1286.o
+obj-$(CONFIG_SGI_NEWPORT_GFX) += graphics.o rrm.o
include $(TOPDIR)/Rules.make
Index: ds1286.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/ds1286.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- ds1286.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ ds1286.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -1,32 +1,30 @@
-/* $Id$
- *
- * Real Time Clock interface for Linux
+/*
+ * DS1286 Real Time Clock interface for Linux
*
- * Copyright (C) 1998, 1999 Ralf Baechle
+ * Copyright (C) 1998, 1999, 2000 Ralf Baechle
*
- * Based on code written by Paul Gortmaker.
+ * Based on code written by Paul Gortmaker.
*
- * This driver allows use of the real time clock (built into
- * nearly all computers) from user space. It exports the /dev/rtc
- * interface supporting various ioctl() and also the /proc/rtc
- * pseudo-file for status information.
+ * This driver allows use of the real time clock (built into nearly all
+ * computers) from user space. It exports the /dev/rtc interface supporting
+ * various ioctl() and also the /proc/rtc pseudo-file for status
+ * information.
*
- * The ioctls can be used to set the interrupt behaviour and
- * generation rate from the RTC via IRQ 8. Then the /dev/rtc
- * interface can be used to make use of these timer interrupts,
- * be they interval or alarm based.
+ * The ioctls can be used to set the interrupt behaviour and generation rate
+ * from the RTC via IRQ 8. Then the /dev/rtc interface can be used to make
+ * use of these timer interrupts, be they interval or alarm based.
*
- * The /dev/rtc interface will block on reads until an interrupt
- * has been received. If a RTC interrupt has already happened,
- * it will output an unsigned long and then block. The output value
- * contains the interrupt status in the low byte and the number of
- * interrupts since the last read in the remaining high bytes. The
- * /dev/rtc interface can also be used with the select(2) call.
+ * The /dev/rtc interface will block on reads until an interrupt has been
+ * received. If a RTC interrupt has already happened, it will output an
+ * unsigned long and then block. The output value contains the interrupt
+ * status in the low byte and the number of interrupts since the last read
+ * in the remaining high bytes. The /dev/rtc interface can also be used with
+ * the select(2) call.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
*/
#include <linux/types.h>
#include <linux/errno.h>
@@ -38,7 +36,6 @@
#include <linux/poll.h>
#include <linux/rtc.h>
#include <linux/spinlock.h>
-#include <linux/smp_lock.h>
#include <asm/ds1286.h>
#include <asm/io.h>
@@ -56,8 +53,6 @@
static DECLARE_WAIT_QUEUE_HEAD(ds1286_wait);
-static long long ds1286_llseek(struct file *file, loff_t offset, int origin);
-
static ssize_t ds1286_read(struct file *file, char *buf,
size_t count, loff_t *ppos);
@@ -83,63 +78,20 @@
#define RTC_IS_OPEN 0x01 /* means /dev/rtc is in use */
#define RTC_TIMER_ON 0x02 /* missed irq timer active */
-unsigned char ds1286_status = 0; /* bitmapped status byte. */
-unsigned long ds1286_freq = 0; /* Current periodic IRQ rate */
-unsigned long ds1286_irq_data = 0; /* our output to the world */
+unsigned char ds1286_status; /* bitmapped status byte. */
+unsigned long ds1286_freq; /* Current periodic IRQ rate */
unsigned char days_in_mo[] =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
/*
- * A very tiny interrupt handler. It runs with SA_INTERRUPT set,
- * so that there is no possibility of conflicting with the
- * set_rtc_mmss() call that happens during some timer interrupts.
- * (See ./arch/XXXX/kernel/time.c for the set_rtc_mmss() function.)
- */
-
-/*
* Now all the various file operations that we export.
*/
-static long long ds1286_llseek(struct file *file, loff_t offset, int origin)
-{
- return -ESPIPE;
-}
-
static ssize_t ds1286_read(struct file *file, char *buf,
size_t count, loff_t *ppos)
{
- DECLARE_WAITQUEUE(wait, current);
- unsigned long data;
- ssize_t retval;
-
- if (count < sizeof(unsigned long))
- return -EINVAL;
-
- add_wait_queue(&ds1286_wait, &wait);
-
- current->state = TASK_INTERRUPTIBLE;
-
- while ((data = xchg(&ds1286_irq_data, 0)) == 0) {
- if (file->f_flags & O_NONBLOCK) {
- retval = -EAGAIN;
- goto out;
- }
- if (signal_pending(current)) {
- retval = -ERESTARTSYS;
- goto out;
- }
- schedule();
- }
-
- retval = put_user(data, (unsigned long *)buf);
- if (!retval)
- retval = sizeof(unsigned long);
- out:
- current->state = TASK_RUNNING;
- remove_wait_queue(&ds1286_wait, &wait);
-
- return retval;
+ return -EIO;
}
static int ds1286_ioctl(struct inode *inode, struct file *file,
@@ -345,27 +297,32 @@
static int ds1286_open(struct inode *inode, struct file *file)
{
- if(ds1286_status & RTC_IS_OPEN)
- return -EBUSY;
+ spin_lock_irq(&ds1286_lock);
+
+ if (ds1286_status & RTC_IS_OPEN)
+ goto out_busy;
ds1286_status |= RTC_IS_OPEN;
- ds1286_irq_data = 0;
+
+ spin_lock_irq(&ds1286_lock);
return 0;
+
+out_busy:
+ spin_lock_irq(&ds1286_lock);
+ return -EBUSY;
}
static int ds1286_release(struct inode *inode, struct file *file)
{
- lock_kernel();
ds1286_status &= ~RTC_IS_OPEN;
- unlock_kernel();
+
return 0;
}
static unsigned int ds1286_poll(struct file *file, poll_table *wait)
{
poll_wait(file, &ds1286_wait, wait);
- if (ds1286_irq_data != 0)
- return POLLIN | POLLRDNORM;
+
return 0;
}
@@ -374,7 +331,7 @@
*/
static struct file_operations ds1286_fops = {
- llseek: ds1286_llseek,
+ llseek: no_llseek,
read: ds1286_read,
poll: ds1286_poll,
ioctl: ds1286_ioctl,
@@ -414,7 +371,7 @@
get_rtc_time(&tm);
hundredth = CMOS_READ(RTC_HUNDREDTH_SECOND);
- hundredth = BCD_TO_BIN(hundredth);
+ BCD_TO_BIN(hundredth);
p += sprintf(p,
"rtc_time\t: %02d:%02d:%02d.%02d\n"
Index: graphics.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/graphics.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- graphics.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ graphics.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -1,5 +1,4 @@
-/* $Id$
- *
+/*
* gfx.c: support for SGI's /dev/graphics, /dev/opengl
*
* Author: Miguel de Icaza (mi...@nu...)
@@ -153,11 +152,11 @@
* sgi_graphics_mmap
*/
disable_gconsole ();
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
r = do_mmap (file, (unsigned long)vaddr,
cards[board].g_regs_size, PROT_READ|PROT_WRITE,
MAP_FIXED|MAP_PRIVATE, 0);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (r)
return r;
}
@@ -214,8 +213,7 @@
/*
* This is the core of the direct rendering engine.
*/
-
-unsigned long
+struct page *
sgi_graphics_nopage (struct vm_area_struct *vma, unsigned long address, int
no_share)
{
@@ -250,7 +248,6 @@
pgd = pgd_offset(current->mm, address);
pmd = pmd_offset(pgd, address);
pte = pte_offset(pmd, address);
- printk("page: %08lx\n", pte_page(*pte));
return pte_page(*pte);
}
@@ -346,6 +343,8 @@
}
#ifdef MODULE
+MODULE_LICENSE("GPL");
+
int init_module(void) {
static int initiated = 0;
Index: newport.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/newport.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- newport.c 14 Jan 2001 18:58:13 -0000 1.1.1.1
+++ newport.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -16,6 +16,8 @@
struct newport_regs *npregs;
+EXPORT_SYMBOL(npregs);
+
/* Kernel routines for supporting graphics context switching */
void newport_save (void *y)
Index: rrm.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/rrm.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- rrm.c 14 Jan 2001 18:58:06 -0000 1.1.1.1
+++ rrm.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -9,12 +9,11 @@
*
* Fixes:
*/
+#include <linux/module.h>
+
#include <asm/uaccess.h>
#include <asm/rrm.h>
-#ifdef MODULE
-#include <linux/module.h>
-#endif
int
rrm_open_rn (int rnid, void *arg)
@@ -71,3 +70,6 @@
/* This routine is invoked when the device is closed */
return 0;
}
+
+EXPORT_SYMBOL(rrm_command);
+EXPORT_SYMBOL(rrm_close);
Index: sgicons.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/sgicons.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- sgicons.c 14 Jan 2001 18:58:13 -0000 1.1.1.1
+++ sgicons.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -1,5 +1,4 @@
-/* $Id$
- *
+/*
* sgicons.c: Setting up and registering console I/O on the SGI.
*
* Copyright (C) 1996 David S. Miller (dm...@en...)
@@ -10,12 +9,10 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/errno.h>
+#include <linux/module.h>
#include <asm/uaccess.h>
#include "gconsole.h"
-/* To make psaux code cleaner */
-unsigned char aux_device_present = 0xaa;
-
/* This is the system graphics console (the first adapter found) */
struct console_ops *gconsole = 0;
struct console_ops *real_gconsole = 0;
@@ -35,6 +32,9 @@
gconsole = 0;
}
}
+
+EXPORT_SYMBOL(disable_gconsole);
+EXPORT_SYMBOL(enable_gconsole);
void
register_gconsole (struct console_ops *gc)
Index: sgiserial.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/sgiserial.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- sgiserial.c 14 Jan 2001 18:58:05 -0000 1.1.1.1
+++ sgiserial.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -13,6 +13,9 @@
* thorough pass to merge in the rest of the updates.
* Better still, someone really ought to make it a common
* code module for both platforms. ke...@mi...
+ *
+ * 20010616 - Klaus Naumann <sp...@mg...> : Make serial console work with
+ * any speed - not only 9600
*/
#include <linux/config.h> /* for CONFIG_REMOTE_DEBUG */
@@ -58,9 +61,9 @@
static int zilog_irq = SGI_SERIAL_IRQ;
/* Console hooks... */
-static int zs_cons_chanout = 0;
-static int zs_cons_chanin = 0;
-struct sgi_serial *zs_consinfo = 0;
+static int zs_cons_chanout;
+static int zs_cons_chanin;
+struct sgi_serial *zs_consinfo;
static unsigned char kgdb_regs[16] = {
0, 0, 0, /* write 0, 1, 2 */
@@ -97,6 +100,7 @@
DECLARE_TASK_QUEUE(tq_serial);
struct tty_driver serial_driver, callout_driver;
+struct console *sgisercon;
static int serial_refcount;
/* serial subtype definitions */
@@ -144,10 +148,10 @@
dev_t device, const char *routine)
{
#ifdef SERIAL_PARANOIA_CHECK
- static const char *badmagic =
+ static const char *badmagic = KERN_WARNING
"Warning: bad magic number for serial struct (%d, %d) in %s\n";
- static const char *badinfo =
- "Warning: null sun_serial for (%d, %d) in %s\n";
+ static const char *badinfo = KERN_WARNING
+ "Warning: null sgi_serial for (%d, %d) in %s\n";
if (!info) {
printk(badinfo, MAJOR(device), MINOR(device), routine);
@@ -178,7 +182,8 @@
* interrupts are enabled. Therefore we have to check ioc_iocontrol before we
* access it.
*/
-static inline unsigned char read_zsreg(struct sgi_zschannel *channel, unsigned char reg)
+static inline unsigned char read_zsreg(struct sgi_zschannel *channel,
+ unsigned char reg)
{
unsigned char retval;
volatile unsigned char junk;
@@ -192,7 +197,8 @@
return retval;
}
-static inline void write_zsreg(struct sgi_zschannel *channel, unsigned char reg, unsigned char value)
+static inline void write_zsreg(struct sgi_zschannel *channel,
+ unsigned char reg, unsigned char value)
{
volatile unsigned char junk;
@@ -323,7 +329,7 @@
*/
static void batten_down_hatches(void)
{
- prom_imode();
+ ArcEnterInteractiveMode();
#if 0
/* If we are doing kadb, we call the debugger
* else we just drop into the boot monitor.
@@ -682,7 +688,7 @@
save_flags(flags); cli();
#ifdef SERIAL_DEBUG_OPEN
- printk("starting up ttys%d (irq %d)...", info->line, info->irq);
+ printk("starting up ttys%d (irq %d)...\n", info->line, info->irq);
#endif
/*
@@ -1302,6 +1308,59 @@
junk = ioc_icontrol->istat0;
sti();
return put_user(status,value);
+}
+
+static int get_modem_info(struct sgi_serial * info, unsigned int *value)
+{
+ unsigned char status;
+ unsigned int result;
+
+ cli();
+ status = info->zs_channel->control;
+ udelay(2);
+ sti();
+ result = ((info->curregs[5] & RTS) ? TIOCM_RTS : 0)
+ | ((info->curregs[5] & DTR) ? TIOCM_DTR : 0)
+ | ((status & DCD) ? TIOCM_CAR : 0)
+ | ((status & SYNC) ? TIOCM_DSR : 0)
+ | ((status & CTS) ? TIOCM_CTS : 0);
+ if (put_user(result, value))
+ return -EFAULT;
+ return 0;
+}
+
+static int set_modem_info(struct sgi_serial * info, unsigned int cmd,
+ unsigned int *value)
+{
+ unsigned int arg;
+
+ if (get_user(arg, value))
+ return -EFAULT;
+ switch (cmd) {
+ case TIOCMBIS:
+ if (arg & TIOCM_RTS)
+ info->curregs[5] |= RTS;
+ if (arg & TIOCM_DTR)
+ info->curregs[5] |= DTR;
+ break;
+ case TIOCMBIC:
+ if (arg & TIOCM_RTS)
+ info->curregs[5] &= ~RTS;
+ if (arg & TIOCM_DTR)
+ info->curregs[5] &= ~DTR;
+ break;
+ case TIOCMSET:
+ info->curregs[5] = ((info->curregs[5] & ~(RTS | DTR))
+ | ((arg & TIOCM_RTS) ? RTS : 0)
+ | ((arg & TIOCM_DTR) ? DTR : 0));
+ break;
+ default:
+ return -EINVAL;
+ }
+ cli();
+ write_zsreg(info->zs_channel, 5, info->curregs[5]);
+ sti();
+ return 0;
}
/*
@@ -1322,11 +1381,10 @@
static int rs_ioctl(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg)
{
- int error;
- struct sgi_serial * info = (struct sgi_serial *)tty->driver_data;
+ struct sgi_serial * info = (struct sgi_serial *) tty->driver_data;
int retval;
- if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
+ if (serial_paranoia_check(info, tty->device, "zs_ioctl"))
return -ENODEV;
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
@@ -1353,45 +1411,36 @@
send_break(info, arg ? arg*(HZ/10) : HZ/4);
return 0;
case TIOCGSOFTCAR:
- error = verify_area(VERIFY_WRITE, (void *) arg,sizeof(long));
- if (error)
- return error;
- put_user(C_CLOCAL(tty) ? 1 : 0,
- (unsigned long *) arg);
+ if (put_user(C_CLOCAL(tty) ? 1 : 0,
+ (unsigned long *) arg))
+ return -EFAULT;
return 0;
case TIOCSSOFTCAR:
- error = get_user(arg, (unsigned long *)arg);
- if (error)
- return error;
+ if (get_user(arg, (unsigned long *) arg))
+ return -EFAULT;
tty->termios->c_cflag =
((tty->termios->c_cflag & ~CLOCAL) |
(arg ? CLOCAL : 0));
return 0;
+ case TIOCMGET:
+ return get_modem_info(info, (unsigned int *) arg);
+ case TIOCMBIS:
+ case TIOCMBIC:
+ case TIOCMSET:
+ return set_modem_info(info, cmd, (unsigned int *) arg);
case TIOCGSERIAL:
- error = verify_area(VERIFY_WRITE, (void *) arg,
- sizeof(struct serial_struct));
- if (error)
- return error;
return get_serial_info(info,
(struct serial_struct *) arg);
case TIOCSSERIAL:
return set_serial_info(info,
(struct serial_struct *) arg);
case TIOCSERGETLSR: /* Get line status register */
- error = verify_area(VERIFY_WRITE, (void *) arg,
- sizeof(unsigned int));
- if (error)
- return error;
- else
- return get_lsr_info(info, (unsigned int *) arg);
+ return get_lsr_info(info, (unsigned int *) arg);
case TIOCSERGSTRUCT:
- error = verify_area(VERIFY_WRITE, (void *) arg,
- sizeof(struct sgi_serial));
- if (error)
- return error;
- copy_to_user((struct sun_serial *) arg,
- info, sizeof(struct sgi_serial));
+ if (copy_to_user((struct sgi_serial *) arg,
+ info, sizeof(struct sgi_serial)))
+ return -EFAULT;
return 0;
default:
@@ -1727,11 +1776,19 @@
change_speed(info);
}
+ /* If this is the serial console change the speed to
+ * the right value
+ */
+ if (info->is_cons) {
+ info->tty->termios->c_cflag = sgisercon->cflag;
+ change_speed(info);
+ }
+
info->session = current->session;
info->pgrp = current->pgrp;
#ifdef SERIAL_DEBUG_OPEN
- printk("rs_open ttys%d successful...", info->line);
+ printk("rs_open ttys%d successful...\n", info->line);
#endif
return 0;
}
@@ -1748,13 +1805,10 @@
{
extern struct hpc3_miscregs *hpc3mregs;
- if(chip > 0) {
- prom_printf("Wheee, bogus zs chip number requested.\n");
- prom_getchar();
- romvec->imode();
- }
- return (struct sgi_zslayout *) (&hpc3mregs->ser1cmd);
+ if (chip > 0)
+ panic("Wheee, bogus zs chip number requested.");
+ return (struct sgi_zslayout *) (&hpc3mregs->ser1cmd);
}
@@ -1784,13 +1838,6 @@
}
if(o && i)
io = 1;
- if(ss->zs_baud != 9562) { /* Don't ask... */
- prom_printf("BAD console baud rate %d\n", ss->zs_baud);
- prom_getchar();
- prom_imode();
- panic("Console baud rate weirdness");
- }
-
/* Set flag variable for this port so that it cannot be
* opened for other uses by accident.
@@ -1798,7 +1845,7 @@
ss->is_cons = 1;
if(io) {
- if(!msg_printed) {
+ if (!msg_printed) {
printk("zs%d: console I/O\n", ((channel>>1)&1));
msg_printed = 1;
}
@@ -1806,7 +1853,6 @@
} else {
printk("zs%d: console %s\n", ((channel>>1)&1),
(i==1 ? "input" : (o==1 ? "output" : "WEIRD")));
-
}
}
@@ -2002,7 +2048,6 @@
rs_cons_hook(int chip, int out, int line)
{
int channel;
-
if(chip)
panic("rs_cons_hook called with chip not zero");
@@ -2087,11 +2132,11 @@
static int __init zs_console_setup(struct console *con, char *options)
{
struct sgi_serial *info;
- int baud = 9600;
+ int baud;
int bits = 8;
int parity = 'n';
int cflag = CREAD | HUPCL | CLOCAL;
- char *s;
+ char *s, *dbaud;
int i, brg;
if (options) {
@@ -2102,6 +2147,21 @@
if (*s) parity = *s++;
if (*s) bits = *s - '0';
}
+ else {
+ /* If the user doesn't set console=... try to read the
+ * PROM variable - if this fails use 9600 baud and
+ * inform the user about the problem
+ */
+ dbaud = ArcGetEnvironmentVariable("dbaud");
+ if(dbaud) baud = simple_strtoul(dbaud, NULL, 10);
+ else {
+ /* Use prom_printf() to make sure that the user
+ * is getting anything ...
+ */
+ prom_printf("No dbaud set in PROM ?!? Using 9600.\n");
+ baud = 9600;
+ }
+ }
/*
* Now construct a cflag setting.
@@ -2156,7 +2216,8 @@
info = zs_soft + con->index;
info->is_cons = 1;
- printk("Console: ttyS%d (Zilog8530)\n", info->line);
+ printk("Console: ttyS%d (Zilog8530), %d baud\n",
+ info->line, baud);
i = con->cflag & CBAUD;
if (con->cflag & CBAUDEX) {
@@ -2195,6 +2256,8 @@
zscons_regs[4] |= SB2;
else
zscons_regs[4] |= SB1;
+
+ sgisercon = con;
brg = BPS_TO_BRG(baud, ZS_CLOCK / info->clk_divisor);
zscons_regs[12] = brg & 0xff;
Index: sgiserial.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/sgiserial.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- sgiserial.h 14 Jan 2001 18:58:15 -0000 1.1.1.1
+++ sgiserial.h 11 Apr 2002 12:55:55 -0000 1.2
@@ -359,7 +359,7 @@
#define ZCOUNT 0x2 /* Zero count */
#define Tx_BUF_EMP 0x4 /* Tx Buffer empty */
#define DCD 0x8 /* DCD */
-#define SYNC_HUNT 0x10 /* Sync/hunt */
+#define SYNC 0x10 /* Sync/hunt */
#define CTS 0x20 /* CTS */
#define TxEOM 0x40 /* Tx underrun */
#define BRK_ABRT 0x80 /* Break/Abort */
Index: shmiq.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/shmiq.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- shmiq.c 14 Jan 2001 18:58:17 -0000 1.1.1.1
+++ shmiq.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -1,5 +1,4 @@
-/* $Id$
- *
+/*
* shmiq.c: shared memory input queue driver
* written 1997 Miguel de Icaza (mi...@nu...)
*
@@ -42,7 +41,6 @@
* Until then, I just allow for 1 qcntl device.
*
*/
-
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/sched.h>
@@ -52,6 +50,7 @@
#include <linux/vmalloc.h>
#include <linux/wait.h>
#include <linux/major.h>
+#include <linux/module.h>
#include <linux/smp_lock.h>
#include <linux/devfs_fs_kernel.h>
@@ -286,11 +285,11 @@
s = req.arg * sizeof (struct shmqevent) +
sizeof (struct sharedMemoryInputQueue);
v = sys_munmap (vaddr, s);
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
do_munmap(current->mm, vaddr, s);
do_mmap(filp, vaddr, s, PROT_READ | PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 0);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
shmiqs[minor].events = req.arg;
shmiqs[minor].mapped = 1;
@@ -470,3 +469,5 @@
S_IFCHR | S_IRUSR | S_IWUSR,
&shmiq_fops, NULL);
}
+
+EXPORT_SYMBOL(shmiq_init);
Index: streamable.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/streamable.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
Index: usema.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sgi/char/usema.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- usema.c 14 Jan 2001 18:58:19 -0000 1.1.1.1
+++ usema.c 11 Apr 2002 12:55:55 -0000 1.2
@@ -20,8 +20,7 @@
* usema(7m), usinit(3p), usnewsema(3p)
* /usr/include/sys/usioctl.h
*
-*/
-
+ */
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/sched.h>
@@ -31,6 +30,7 @@
#include <linux/string.h>
#include <linux/dcache.h>
#include <linux/mm.h>
+#include <linux/module.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include "usema.h"
@@ -180,3 +180,5 @@
SGI_USEMACLONE);
misc_register(&dev_usemaclone);
}
+
+EXPORT_SYMBOL(usema_init);
--- graphics_syms.c DELETED ---
--- linux_logo.h DELETED ---
|