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: * @(#)rlreg.h 1.2 (2.11BSD) 1997/7/20
7: */
8:
9: struct rldevice
10: {
11: short rlcs;
12: caddr_t rlba;
13: short rlda;
14: short rlmp;
15: short rlbae;
16: };
17:
18: /* bits in rlcs */
19: #define RL_CERR 0100000 /* composite error */
20: #define RL_DRE 0040000 /* drive error */
21: #define RL_NXM 0020000 /* nonexistent memory */
22: #define RL_DLHNF 0010000 /* data late or header not found */
23: #define RL_CRC 0004000 /* data crc or header check or write check */
24: #define RL_OPI 0002000 /* operation incomplete */
25: /* bits 9-8 are drive select */
26: #define RL_CRDY 0000200 /* controller ready */
27: #define RL_IE 0000100 /* interrupt enable */
28: /* bits 5-4 are the UNIBUS address extension bits */
29: /* bits 3-0 is the function code */
30: #define RL_HARDERR (RL_NXM|RL_DLHNF|RL_CRC|RL_OPI)
31:
32: /* commands */
33: #define RL_NOP 0000000 /* no operation */
34: #define RL_WCHK 0000002 /* write check data */
35: #define RL_GETSTATUS 0000004 /* get status */
36: #define RL_SEEK 0000006 /* seek */
37: #define RL_RHDR 0000010 /* read header */
38: #define RL_WCOM 0000012 /* write data */
39: #define RL_RCOM 0000014 /* read data */
40: #define RL_RWHCHK 0000016 /* read data without header check */
41:
42: #define RL_BITS \
43: "\10\20CERR\17DRE\16NXM\15DLHNF\14CRC\13OPI\10CRDY\7IE"
44:
45: /* bits in rlda: just be thankful there's a one to one correspondence */
46: #define RLDA_RW_HSEL 0000100 /* head select during read or write */
47: #define RLDA_SEEK_HSEL 0000020 /* head select during seek*/
48: #define RLDA_RESET 0000011 /* reset during get status */
49: #define RLDA_SEEKHI 0000005 /* seek to higher address */
50: #define RLDA_SEEKLO 0000001 /* seek to lower address */
51: #define RLDA_GS 0000003 /* get status */
52:
53: #define RLDA_BITS \
54: "\10\7RW_HSEL\5SEEK_HSEL\4GS_RESET\3SEEK_DIR"
55:
56: /* bits in rlmp */
57: #define RLMP_WDE 0100000 /* write data error */
58: #define RLMP_HCE 0040000 /* head current error */
59: #define RLMP_WL 0020000 /* write lock */
60: #define RLMP_STIMO 0010000 /* seek timeout */
61: #define RLMP_SPE 0004000 /* spin error */
62: #define RLMP_WGE 0002000 /* write gate error */
63: #define RLMP_VCHK 0001000 /* volume check */
64: #define RLMP_DSE 0000400 /* drive select error */
65: #define RLMP_DTYP 0000200 /* drive type: 0 == RL01, 1 == RL02 */
66: #define RLMP_HSEL 0000100 /* head select */
67: #define RLMP_CO 0000040 /* cover open */
68: #define RLMP_HO 0000020 /* heads out */
69: #define RLMP_BH 0000010 /* brush home */
70: /* bits 2-0 are the state */
71:
72: /* status bits */
73: #define RLMP_LOAD 0000000 /* load cartridge */
74: #define RLMP_SU 0000001 /* spin up */
75: #define RLMP_BC 0000002 /* brush cycle */
76: #define RLMP_LH 0000003 /* load heads */
77: #define RLMP_SEEK 0000004 /* seek */
78: #define RLMP_LCKON 0000005 /* lock on */
79: #define RLMP_UH 0000006 /* unload heads */
80: #define RLMP_SD 0000007 /* spin down */
81:
82: #define RLMP_BITS \
83: "\10\20WDE\17HCE\16WLE\15STIMO\14SPE\13WGE\12VCHK\11DSE\10DTYP\
84: \7HSEL\6CO\5HO\4BH"
Defined struct's
rldevice
defined in line
9; used 36 times
- in /usr/src/sys/autoconfig/rlauto.c line
17(2)
- in /usr/src/sys/pdpstand/rl.c line
23-27(8),
61(2),
176(2)
- in /usr/src/sys/pdpuba/rl.c line
71(2),
109-113(4),
123(2),
133(2),
415(2),
486(2),
517(2),
548(2),
611(2),
748(2)
Defined macros
RL_IE
defined in line
27; used 1 times
Usage of this include