1 /* $NetBSD: rlreg.h,v 1.2.10.1 2005/03/04 16:49:54 skrll Exp $ */
4 * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed at Ludd, University of
17 * Lule}, Sweden and its contributors.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 #define RL_BAE 8 /* Only on RLV12 */
43 * Bits in Control/Status register
45 #define RLCS_DRDY 0000001
46 #define RLCS_IE 0000100
47 #define RLCS_CRDY 0000200
48 #define RLCS_DE 0040000
49 #define RLCS_ERR 0100000
50 #define RLCS_ERRMSK 0036000
51 /* Command to give to drive */
52 #define RLCS_NOOP 0000000 /* No operation */
53 #define RLCS_WCK 0000002 /* Write Check */
54 #define RLCS_GS 0000004 /* Get Status */
55 #define RLCS_SEEK 0000006 /* Seek */
56 #define RLCS_RHDR 0000010 /* Read Header */
57 #define RLCS_WD 0000012 /* Write data */
58 #define RLCS_RD 0000014 /* Read data */
59 #define RLCS_RDWO 0000016 /* Read data without hdr check */
60 #define RLCS_USHFT 8 /* Shift unit number left */
61 #define RLCS_ADSHFT 4 /* Shift address bits 16-17 left */
64 * Bits in Disk Address register
66 #define RLDA_SEEK 0000001 /* Issue a "Seek" command */
67 #define RLDA_GS 0000003 /* Issue a "Get Status" command */
68 #define RLDA_DIR 0000004 /* Move head towards spindle */
69 #define RLDA_RST 0000010 /* Reset the drive */
70 #define RLDA_HSSEEK 0000020 /* Head select for seek */
71 #define RLDA_HSRW 0000100 /* Head select for read/write */
72 #define RLDA_CYLSHFT 7
75 * Bits in Multipurpose register
77 #define RLMP_STATUS 0000007 /* Status bits mask */
78 #define RLMP_UNLOAD 0 /* not loaded */
79 #define RLMP_SPINUP 1 /* spinning up */
80 #define RLMP_BRUSHING 2 /* brushes out */
81 #define RLMP_LOADHEADS 3 /* loading heads */
82 #define RLMP_SEEKING 4 /* seeking */
83 #define RLMP_LOCKED 5 /* lock turned on */
84 #define RLMP_UNLHEADS 6 /* unloading heads */
85 #define RLMP_SPUNDOWN 7 /* disk spun down */
87 #define RLMP_DT 0000200 /* Set if RL02, otherwise RL01 */
88 #define RLMP_HS 0000100 /* Head select */
91 * RL01/RL02 disk layout.
93 #define RL_BPS 256 /* Bytes/sector */
94 #define RL_SPT 40 /* Sectors/track */
95 #define RL_TPS01 256 /* Tracks/surface RL01 */
96 #define RL_TPS02 512 /* Tracks/surface RL02 */
97 #define RL_SPD 2 /* Surfaces/disk */
102 #define RL_MAXDPC 4 /* Max disks/controller */