[BACK]Return to ctreg.h CVS log [TXT][DIR] Up to [local] / sys / arch / hp300 / dev

Annotation of sys/arch/hp300/dev/ctreg.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: ctreg.h,v 1.7 2005/11/18 00:09:15 miod Exp $  */
                      2: /*     $NetBSD: ctreg.h,v 1.6 1996/02/09 18:00:35 scottr Exp $ */
                      3:
                      4: /*
                      5:  * Copyright (c) 1982, 1990, 1993
                      6:  *     The Regents of the University of California.  All rights reserved.
                      7:  *
                      8:  * Redistribution and use in source and binary forms, with or without
                      9:  * modification, are permitted provided that the following conditions
                     10:  * are met:
                     11:  * 1. Redistributions of source code must retain the above copyright
                     12:  *    notice, this list of conditions and the following disclaimer.
                     13:  * 2. Redistributions in binary form must reproduce the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer in the
                     15:  *    documentation and/or other materials provided with the distribution.
                     16:  * 3. Neither the name of the University nor the names of its contributors
                     17:  *    may be used to endorse or promote products derived from this software
                     18:  *    without specific prior written permission.
                     19:  *
                     20:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     21:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     22:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     23:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     24:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     25:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     26:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     27:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     28:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     29:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     30:  * SUCH DAMAGE.
                     31:  *
                     32:  *     @(#)ctreg.h     8.1 (Berkeley) 6/10/93
                     33:  */
                     34:
                     35: struct ct_iocmd {
                     36:        char    unit;
                     37:        char    saddr;
                     38:        short   addr0;
                     39:        long    addr;
                     40:        char    nop2;
                     41:        char    slen;
                     42:        long    len;
                     43:        char    nop3;
                     44:        char    cmd;
                     45: };
                     46:
                     47: struct ct_rscmd {
                     48:        char    unit;
                     49:        char    cmd;
                     50: };
                     51:
                     52: struct ct_stat {
                     53:        char    c_vu;
                     54:        char    c_pend;
                     55:        short   c_ref;
                     56:        short   c_fef;
                     57:        short   c_aef;
                     58:        short   c_ief;
                     59:        short   c_blk0;
                     60:        long    c_blk;
                     61:        char    c_pad[4];
                     62: };
                     63:
                     64: struct ct_ssmcmd {
                     65:        char    unit;
                     66:        char    cmd;
                     67:        short   refm;
                     68:        short   fefm;
                     69:        short   aefm;
                     70:        short   iefm;
                     71: };
                     72:
                     73: struct ct_srcmd {
                     74:        char    unit;
                     75:        char    nop;
                     76:        char    cmd;
                     77:        char    param;
                     78: };
                     79:
                     80: struct ct_soptcmd {
                     81:        char    unit;
                     82:        char    nop;
                     83:        char    cmd;
                     84:        char    opt;
                     85: };
                     86:
                     87: struct ct_ulcmd {
                     88:        char    unit;
                     89:        char    cmd;
                     90: };
                     91:
                     92: struct ct_wfmcmd {
                     93:        char    unit;
                     94:        char    cmd;
                     95: };
                     96:
                     97: struct ct_clearcmd {
                     98:        char    unit;
                     99:        char    cmd;
                    100: };
                    101:
                    102: #define        CT7946ID        0x220
                    103: #define CT9145ID       0x268
                    104: #define        CT9144ID        0x260
                    105: #define        CT9144          0
                    106: #define        CT7912PID       0x209
                    107: #define        CT7914PID       0x20B
                    108: #define        CT88140         1
                    109:
                    110: /* convert bytes to 1k tape block and back */
                    111: #define CTBTOK(x)      ((x) >> 10)
                    112: #define CTKTOB(x)      ((x) << 10)
                    113:
                    114: #define        CTCTLR          15
                    115:
                    116: #define        REF_MASK        0x0
                    117: #define        FEF_MASK        0x0
                    118: #define        AEF_MASK        0x0
                    119: #define        IEF_MASK        0xF970
                    120:
                    121: #define        FEF_PF          0x0002
                    122: #define        FEF_REXMT       0x0001
                    123: #define        AEF_EOF         0x0010
                    124: #define        AEF_EOV         0x0008
                    125:
                    126: #define        C_READ          0x00
                    127: #define        C_WRITE         0x02
                    128: #define        C_CLEAR         0x08
                    129: #define        C_STATUS        0x0d
                    130: #define        C_SADDR         0x10
                    131: #define        C_SLEN          0x18
                    132: #define        C_SUNIT(x)      (0x20 | (x))
                    133: #define        C_SVOL(x)       (0x40 | (x))
                    134: #define        C_NOP           0x34
                    135: #define C_DESC         0x35
                    136: #define        C_SOPT          0x38
                    137: #define        C_SREL          0x3b
                    138: #define        C_SSM           0x3e
                    139: #define        C_WFM           0x49
                    140: #define        C_UNLOAD        0x4a
                    141: #define C_REL          0xc0
                    142:
                    143: #define        C_CMD           0x05
                    144: #define        C_EXEC          0x0e
                    145: #define        C_QSTAT         0x10
                    146: #define        C_TCMD          0x12
                    147:
                    148: #define C_CC            1
                    149: #define C_SKSPAR        2
                    150: #define        C_OPT           4
                    151: #define C_SPAR          4
                    152: #define C_IMRPT         8

CVSweb