1: /*
   2:  * Copyright (c) 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)drreg.h	1.1 (2.10BSD Berkeley) 12/1/86
   7:  */
   8: 
   9: /*
  10:  *	Registers of the DR11-W parallel DMA interface
  11:  */
  12: struct  drdevice {
  13:     short   wcr;        /* word count register */
  14:     short   bar;        /* bus address register */
  15:     short   csr;        /* csr/eir register */
  16:     short   dar;        /* input/output data register */
  17: };
  18: 
  19: struct  sg1 {
  20:     short   word;       /* pass one word of info in or out */
  21: };
  22: 
  23: struct  sg2 {
  24:     short   word1;      /* pass two words of info in or out */
  25:     short   word2;
  26: };
  27: 
  28: /* Bits of the csr */
  29: #define DR_GO   0000001     /* start transfer */
  30: #define DR_FN1  0000002     /* user defined function bits */
  31: #define DR_FN2  0000004
  32: #define DR_FN3  0000010
  33: #define DR_XBA  0000060     /* Unibus extension bits */
  34: #define DR_IE   0000100     /* interrupt enable */
  35: #define DR_RDY  0000200     /* ready bit */
  36: #define DR_CYL  0000400     /* cycle start */
  37: #define DR_ST1  0001000     /* user defined status */
  38: #define DR_ST2  0002000
  39: #define DR_ST3  0004000
  40: #define DR_MANT 0010000     /* maintenance mode bit */
  41: #define DR_ATTN 0020000     /* attention bit from interface */
  42: #define DR_NEX  0040000     /* non-existant memory */
  43: #define DR_ERR  0100000     /* general error bit */
  44: 
  45: #define DRCSR_BITS  \
  46: "\10\20ERR\17NEX\16ATTN\15MAINT\14STA\13STB\12STC\
  47: \11CYCL\10RDY\7IE\6XBA17\5XBA16\4FN3\3FN2\2FN1\1GO"
  48: 
  49: /* Bits of the EIR */
  50: #define DR_FLG  0000001     /* register flag 1=EIR, 0=CSR */
  51: #define DR_NCYL 0000400     /* N-cycle burst selected */
  52: #define DR_BDL  0001000     /* Burst data late */
  53: #define DR_PAR  0002000     /* parity error */
  54: #define DR_ACLO 0004000     /* powerfailure */
  55: #define DR_MRQ  0010000     /* multicycle request */
  56: 
  57: /* All remaining bits same as CSR */
  58: #define DREIR_BITS  \
  59:     "\10\20ERR\17NEX\16ATTN\15MRQ\14ACLO\13PAR\12BDL\11NCYL\1REG"
  60: 
  61: /*
  62:  *	Definitions for ioctl calls for DR11-W interface
  63:  */
  64: #define DRGTTY      _IOR(d, 1, struct sg2)  /* get dr11 status */
  65: #define DRSTTY      _IOW(d, 2, struct sg2)  /* set flags & function */
  66: #define DRSFUN      _IOW(d, 3, struct sg1)  /* set function */
  67: #define DRSFLAG     _IOW(d, 4, struct sg1)  /* set flags */
  68: #define DRGCSR      _IOR(d, 5, struct sg2)  /* get csr and wcr */
  69: #define DRSSIG      _IOW(d, 6, struct sg1)  /* set sig for ATTN interrupt */
  70: #define DRESET      _IO(d, 7)       /* reset DR11-W interface */
  71: #define DRSTIME     _IOW(d, 8, struct sg1)  /* set timeout */
  72: #define DRCTIME     _IO(d, 9)       /* set timeout inactive */
  73: #define DROUTPUT    _IOW(d, 10, struct sg1) /* word to output data reg */
  74: #define DRINPUT     _IOR(d, 11, struct sg1) /* word from input data reg */
  75: #define DRITIME     _IO(d, 12)      /* no set error on timeout */
  76: 
  77: /*
  78:  *	i_flags definition
  79:  */
  80: #define DR_ALIVE    0000001 /* unit has attatched */
  81: #define DR_OPEN     0000002 /* unit has been opened */
  82: #define DR_TIMEOUT  0000004 /* unit needs timeout (set by user) */
  83: #define DR_TACTIVE  0000010 /* timeout active on unit */
  84: #define DR_IGNORE   0000020 /* ignore timeout error */

Defined struct's

drdevice defined in line 12; used 18 times
sg1 defined in line 19; never used
sg2 defined in line 23; never used

Defined macros

DRCSR_BITS defined in line 45; used 1 times
DRCTIME defined in line 72; never used
DREIR_BITS defined in line 58; used 1 times
DRESET defined in line 70; never used
DRGCSR defined in line 68; never used
DRGTTY defined in line 64; never used
DRINPUT defined in line 74; never used
DRITIME defined in line 75; never used
DROUTPUT defined in line 73; never used
DRSFLAG defined in line 67; never used
DRSFUN defined in line 66; never used
DRSSIG defined in line 69; never used
DRSTIME defined in line 71; never used
DRSTTY defined in line 65; never used
DR_ACLO defined in line 54; never used
DR_ALIVE defined in line 80; used 2 times
DR_ATTN defined in line 41; used 1 times
DR_BDL defined in line 52; never used
DR_CYL defined in line 36; never used
DR_ERR defined in line 43; used 2 times
DR_FLG defined in line 50; never used
DR_FN1 defined in line 30; never used
DR_FN2 defined in line 31; never used
DR_FN3 defined in line 32; never used
DR_GO defined in line 29; used 1 times
DR_IE defined in line 34; used 1 times
DR_IGNORE defined in line 84; used 9 times
DR_MANT defined in line 40; used 4 times
DR_MRQ defined in line 55; never used
DR_NCYL defined in line 51; never used
DR_NEX defined in line 42; never used
DR_OPEN defined in line 81; used 4 times
DR_PAR defined in line 53; never used
DR_RDY defined in line 35; never used
DR_ST1 defined in line 37; never used
DR_ST2 defined in line 38; never used
DR_ST3 defined in line 39; never used
DR_TACTIVE defined in line 83; used 5 times
DR_TIMEOUT defined in line 82; used 8 times
DR_XBA defined in line 33; never used

Usage of this include

Last modified: 1987-01-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1009
Valid CSS Valid XHTML 1.0 Strict