Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/tc Garbage-collect all the (outdated and tota...



details:   https://anonhg.NetBSD.org/src/rev/5be3d5047770
branches:  trunk
changeset: 514592:5be3d5047770
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Sep 06 05:31:49 2001 +0000

description:
Garbage-collect all the (outdated and totally useless) pmax stuff
in this code.

diffstat:

 sys/arch/alpha/tc/scc.c |  248 +-----------------------------------------------
 1 files changed, 3 insertions(+), 245 deletions(-)

diffs (truncated from 424 to 300 lines):

diff -r 20c38b8e4963 -r 5be3d5047770 sys/arch/alpha/tc/scc.c
--- a/sys/arch/alpha/tc/scc.c   Thu Sep 06 02:16:00 2001 +0000
+++ b/sys/arch/alpha/tc/scc.c   Thu Sep 06 05:31:49 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scc.c,v 1.55 2001/08/26 16:39:56 simonb Exp $ */
+/* $NetBSD: scc.c,v 1.56 2001/09/06 05:31:49 thorpej Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -64,12 +64,10 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.55 2001/08/26 16:39:56 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.56 2001/09/06 05:31:49 thorpej Exp $");
 
 #include "opt_ddb.h"
-#ifdef alpha
 #include "opt_dec_3000_300.h"
-#endif
 
 /*
  * Intel 82530 dual usart chip driver. Supports the serial port(s) on the
@@ -105,38 +103,16 @@
 #include <dev/tc/ioasicreg.h>
 #include <dev/tc/ioasicvar.h>
 
-#ifdef alpha
 #undef SCCDEV
 #define        SCCDEV          15                      /* XXX */
-#endif
 
-/*
- * rcons glass-tty console (as used on pmax) needs lk-201 ASCII input
- * support from the tty drivers. This is ugly and broken and won't
- * compile on Alphas.
- */
-#ifdef pmax
-#if NRASTERCONSOLE > 0
-#define HAVE_RCONS
-#endif
-extern int pending_remcons;
-#endif
-
-#ifdef alpha
-#define RASTER_CONSOLE() 1     /* Treat test for cn_screen as true */
 #define raster_console() 1     /* Treat test for cn_screen as true */
 #define CONSOLE_ON_UNIT(unit) 0        /* No raster console on Alphas */
-#endif
-
 
 #define        NSCCLINE        (NSCC*2)
 #define        SCCUNIT(dev)    (minor(dev) >> 1)
 #define        SCCLINE(dev)    (minor(dev) & 0x1)
 
-/* QVSS-compatible in-kernel X input event parser, pointer tracker */
-void   (*sccDivertXInput) __P((int cc)); /* X windows keyboard input routine */
-void   (*sccMouseEvent) __P((int));    /* X windows mouse motion event routine */
-void   (*sccMouseButtons) __P((int));  /* X windows mouse buttons event routine */
 #ifdef DEBUG
 int    debugChar;
 #endif
@@ -230,96 +206,16 @@
 static void    sccreset __P((struct scc_softc *));
 
 int    sccintr __P((void *));
-#ifdef alpha
 void   scc_alphaintr __P((int));
-#endif
 
 /*
  * console variables, for using serial console while still cold and
  * autoconfig has not attached the scc device.
  */
 scc_regmap_t *scc_cons_addr = 0;
-static struct scc_softc coldcons_softc;
 static struct consdev scccons = {
        NULL, NULL, sccGetc, sccPutc, sccPollc, NULL, NODEV, 0
 };
-void           scc_consinit __P((dev_t dev, scc_regmap_t *sccaddr));
-
-
-/*
- * Set up a given unit as a serial console device.
- * We need console output when cold, and before any device is configured.
- * Should be callable when cold, to reset the chip and set parameters
- * for a remote (serial) console or kgdb line.
- * XXX
- * As most DECstations only bring out one rs-232 lead from an SCC
- * to the bulkhead, and use the other for mouse and keyboard, we
- * only allow one unit per SCC to be console.
- */
-void
-scc_consinit(dev, sccaddr)
-       dev_t dev;
-       scc_regmap_t *sccaddr;
-{
-       struct scc_softc *sc;
-       struct termios cterm;
-       struct tty ctty;
-       int s;
-
-       /* Save address in case we're cold. */
-       if (cold && scc_cons_addr == 0) {
-               scc_cons_addr = sccaddr;
-               sc = &coldcons_softc;
-               coldcons_softc.scc_pdma[0].p_addr = sccaddr;
-               coldcons_softc.scc_pdma[1].p_addr = sccaddr;
-       } else {
-               /* being called from sccattach() to reset console */
-               sc = scc_cd.cd_devs[SCCUNIT(dev)];
-       }
-
-       /* Reset chip. */
-       sccreset(sc);
-       /* XXX make sure sccreset() called only once for this chip? */
-
-       /* set console-line parameters */
-       s = spltty();
-       ctty.t_dev = dev;
-       scccons.cn_dev = dev;
-       cterm.c_cflag = CS8;
-#ifdef pmax
-       /* XXX -- why on pmax, not on Alpha? */
-       cterm.c_cflag  |= CLOCAL;
-#endif
-       cterm.c_ospeed = cterm.c_ispeed = 9600;
-       (void) cold_sccparam(&ctty, &cterm, sc);
-       *cn_tab = scccons;
-       DELAY(1000);
-       splx(s);
-}
-
-#ifndef alpha
-void
-scc_oconsinit(sc, dev)
-       struct scc_softc *sc;
-       dev_t dev;
-{
-       struct termios cterm;
-       struct tty ctty;
-       int s;
-
-       s = spltty();
-       ctty.t_dev = dev;
-       cterm.c_cflag = CS8;
-#ifdef pmax
-       /* XXX -- why on pmax, not on Alpha? */
-       cterm.c_cflag  |= CLOCAL;
-#endif
-       cterm.c_ospeed = cterm.c_ispeed = 9600;
-       (void) sccparam(&ctty, &cterm);
-       DELAY(1000);
-       splx(s);
-}
-#endif
 
 /*
  * Test to see if device is present.
@@ -366,7 +262,6 @@
        return (1);
 }
 
-#ifdef alpha
 /*
  * Enable ioasic SCC interrupts and scc DMA engine interrupts.
  * XXX does not really belong here.
@@ -394,7 +289,6 @@
        }
        tc_mb();
 }
-#endif /* alpha */
 
 void
 sccattach(parent, self, aux)
@@ -429,15 +323,9 @@
         * For a remote console, wait a while for previous output to
         * complete.
         */
-#ifdef HAVE_RCONS
-       if (major(cn_tab.cn_dev) == SCCDEV && cn_tab.cn_screen == 0 &&
-               SCCUNIT(cn_tab.cn_dev) == cp->pmax_unit)
-               DELAY(10000);
-#else
        if ((cputype == ST_DEC_3000_500 && sc->sc_dv.dv_unit == 1) ||
            (cputype == ST_DEC_3000_300 && sc->sc_dv.dv_unit == 0))
                DELAY(10000);
-#endif
        pdp = &sc->scc_pdma[0];
 
        /* init pseudo DMA structures */
@@ -460,44 +348,7 @@
        /*
         * Special handling for consoles.
         */
-       if (0 /* cn_tab.cn_screen */) {
-               if (1 /* cn_tab.cn_kbdgetc == sccGetc */) {
-                       if (sc->sc_dv.dv_unit == 1) {
-                               s = spltty();
-                               ctty.t_dev = makedev(SCCDEV, SCCKBD_PORT);
-                               cterm.c_cflag = CS8;
-#ifdef pmax
-                               /* XXX -- why on pmax, not on Alpha? */
-                               cterm.c_cflag |= CLOCAL;
-#endif /* pmax */
-                               cterm.c_ospeed = cterm.c_ispeed = 4800;
-                               (void) sccparam(&ctty, &cterm);
-                               DELAY(10000);
-#ifdef notyet
-                               /*
-                                * For some reason doing this hangs the 3min
-                                * during booting. Fortunately the keyboard
-                                * works ok without it.
-                                */
-                               KBDReset(ctty.t_dev, sccPutc);
-#endif /* notyet */
-                               DELAY(10000);
-                               splx(s);
-                       } else if (sc->sc_dv.dv_unit == 0) {
-                               s = spltty();
-                               ctty.t_dev = makedev(SCCDEV, SCCMOUSE_PORT);
-                               cterm.c_cflag = CS8 | PARENB | PARODD;
-                               cterm.c_ospeed = cterm.c_ispeed = 4800;
-                               (void) sccparam(&ctty, &cterm);
-#ifdef HAVE_RCONS
-                               DELAY(10000);
-                               MouseInit(ctty.t_dev, sccPutc, sccGetc);
-                               DELAY(10000);
-#endif
-                               splx(s);
-                       }
-               }
-       } else if (1 /* SCCUNIT(cn_tab.cn_dev) == sc->sc_dv.dv_unit */) {
+       if (1 /* SCCUNIT(cn_tab.cn_dev) == sc->sc_dv.dv_unit */) {
                s = spltty();
                ctty.t_dev = makedev(SCCDEV,
                    sc->sc_dv.dv_unit == 0 ? SCCCOMM2_PORT : SCCCOMM3_PORT);
@@ -505,13 +356,9 @@
                cterm.c_ospeed = cterm.c_ispeed = 9600;
                (void) sccparam(&ctty, &cterm);
                DELAY(1000);
-#ifdef HAVE_RCONS
-               cn_tab.cn_disabled = 0;
-#endif
                splx(s);
        }
 
-#ifdef alpha
        /*
         * XXX
         * Unit 1 is the remote console, wire it up now.
@@ -529,9 +376,6 @@
                sc->scc_softCAR |= SCCLINE(cn_tab->cn_dev);
        } else
                printf("\n");
-#else  /* !alpha */
-       printf("\n");
-#endif /* !alpha */
 }
 
 /*
@@ -666,14 +510,6 @@
                return (error);
        error = (*tp->t_linesw->l_open)(dev, tp);
 
-#ifdef HAVE_RCONS
-       /* handle raster console specially */
-       if (tp == scctty(makedev(SCCDEV,SCCKBD_PORT)) &&
-           raster_console() && firstopen) {
-               extern struct tty *fbconstty;
-               tp->t_winsize = fbconstty->t_winsize;
-       }
-#endif /* HAVE_RCONS */                
        return (error);
 }
 
@@ -869,17 +705,6 @@
        /*
         * Handle console specially.
         */
-#ifdef HAVE_RCONS
-       if (cn_tab->cn_getc == LKgetc) {
-               if (minor(tp->t_dev) == SCCKBD_PORT) {
-                       cflag = CS8;
-                       ospeed = ttspeedtab(4800, sccspeedtab);
-               } else if (minor(tp->t_dev) == SCCMOUSE_PORT) {
-                       cflag = CS8 | PARENB | PARODD;
-                       ospeed = ttspeedtab(4800, sccspeedtab);
-               }
-       } else if (tp->t_dev == cn_tab->cn_dev)
-#endif /*HAVE_RCONS*/
        {
                cflag = CS8;
                ospeed = ttspeedtab(9600, sccspeedtab);
@@ -974,12 +799,10 @@
        value = sc->scc_wreg[line].wr14;
        SCC_WRITE_REG(regs, line, SCC_WR14, value);
 
-#ifdef alpha
        if (SCCUNIT(tp->t_dev) == 1) {



Home | Main Index | Thread Index | Old Index