[BACK]Return to sccvar.h CVS log [TXT][DIR] Up to [local] / sys / arch / alpha / tc

Annotation of sys/arch/alpha/tc/sccvar.h, Revision 1.1.1.1

1.1       nbrk        1: /* $OpenBSD: sccvar.h,v 1.6 2003/06/02 23:27:44 millert Exp $ */
                      2: /* $NetBSD: sccvar.h,v 1.7 2001/08/26 16:39:56 simonb Exp $ */
                      3:
                      4: /*
                      5:  * Copyright (c) 1991,1990,1989,1994,1995 Carnegie Mellon University
                      6:  * All Rights Reserved.
                      7:  *
                      8:  * Permission to use, copy, modify and distribute this software and its
                      9:  * documentation is hereby granted, provided that both the copyright
                     10:  * notice and this permission notice appear in all copies of the
                     11:  * software, derivative works or modified versions, and any portions
                     12:  * thereof, and that both notices appear in supporting documentation.
                     13:  *
                     14:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     15:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     16:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     17:  *
                     18:  * Carnegie Mellon requests users of this software to return to
                     19:  *
                     20:  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
                     21:  *  School of Computer Science
                     22:  *  Carnegie Mellon University
                     23:  *  Pittsburgh PA 15213-3890
                     24:  *
                     25:  * any improvements or extensions that they make and grant Carnegie Mellon
                     26:  * the rights to redistribute these changes.
                     27:  */
                     28:
                     29: /*-
                     30:  * Copyright (c) 1992, 1993
                     31:  *     The Regents of the University of California.  All rights reserved.
                     32:  *
                     33:  * This code is derived from software contributed to Berkeley by
                     34:  * Ralph Campbell and Rick Macklem.
                     35:  *
                     36:  * Redistribution and use in source and binary forms, with or without
                     37:  * modification, are permitted provided that the following conditions
                     38:  * are met:
                     39:  * 1. Redistributions of source code must retain the above copyright
                     40:  *    notice, this list of conditions and the following disclaimer.
                     41:  * 2. Redistributions in binary form must reproduce the above copyright
                     42:  *    notice, this list of conditions and the following disclaimer in the
                     43:  *    documentation and/or other materials provided with the distribution.
                     44:  * 3. Neither the name of the University nor the names of its contributors
                     45:  *    may be used to endorse or promote products derived from this software
                     46:  *    without specific prior written permission.
                     47:  *
                     48:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     49:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     50:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     51:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     52:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     53:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     54:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     55:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     56:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     57:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     58:  * SUCH DAMAGE.
                     59:  *
                     60:  *     from: @(#)sccreg.h      8.1 (Berkeley) 6/10/93
                     61:  */
                     62:
                     63: /*
                     64:  * Definitions for Intel 82530 serial communications chip.  Each chip is a
                     65:  * dual uart with the A channels used for the keyboard and mouse with the B
                     66:  * channel(s) for comm ports with modem control. Since some registers are
                     67:  * used for the other channel, the following macros are used to access the
                     68:  * register ports.
                     69:  */
                     70:
                     71: #if 1
                     72: #define alpha_sparse
                     73: #endif
                     74:
                     75: #define        DENSE
                     76: #ifdef alpha_sparse
                     77: #undef DENSE
                     78: #define        SPARSE
                     79: #endif
                     80:
                     81: typedef struct {
                     82:        struct {
                     83:                volatile u_int  scc_command;    /* Register select. */
                     84: #ifdef SPARSE
                     85:                u_int           scc_pad0;
                     86: #endif
                     87:                volatile u_int  scc_data;       /* Rx/Tx buffer */
                     88: #ifdef SPARSE
                     89:                u_int           scc_pad1;
                     90: #endif
                     91:        } scc_channel[2];
                     92: } scc_regmap_t;
                     93:
                     94: #define        scc_get_datum(d, v) \
                     95:        do { (v) = ((d) >> 8) & 0xff; alpha_mb(); DELAY(5); } while (0)
                     96: #define        scc_set_datum(d, v) \
                     97:        do { (d) = (volatile unsigned int)(v) << 8; alpha_mb(); DELAY(5); } while (0)
                     98:
                     99: /* From <pmax/dev/pdma.h>. */
                    100: struct pdma {
                    101:        void    *p_addr;
                    102:        char    *p_mem;
                    103:        char    *p_end;
                    104:        int     p_arg;
                    105:        void    (*p_fcn)(struct tty *tp);
                    106: };
                    107:
                    108: /*
                    109:  * Minor device numbers for scc.  Weird because B channel comes first and
                    110:  * the A channels are wired for keyboard/mouse and the B channels for the
                    111:  * comm port(s).
                    112:  */
                    113: #define        SCCCOMM2_PORT   0x0
                    114: #define        SCCMOUSE_PORT   0x1
                    115: #define        SCCCOMM3_PORT   0x2
                    116: #define        SCCKBD_PORT     0x3
                    117:
                    118: int    alpha_donot_kludge_scc;

CVSweb