Commit | Line | Data |
---|---|---|
08be3b19 WN |
1 | /*- |
2 | * Copyright (c) 1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * William Jolitz. | |
7 | * | |
8 | * %sccs.include.noredist.c% | |
9 | * | |
10 | * @(#)wdreg.h 5.1 (Berkeley) %G% | |
11 | */ | |
12 | ||
13 | ||
14 | /* | |
15 | * Disk Controller register definitions. | |
16 | */ | |
17 | #define wd_data 0x0 /* data register (R/W - 16 bits) */ | |
18 | #define wd_error 0x1 /* error register (R) */ | |
19 | #define wd_precomp wd_error /* write precompensation (W) */ | |
20 | #define wd_seccnt 0x2 /* sector count (R/W) */ | |
21 | #define wd_sector 0x3 /* first sector number (R/W) */ | |
22 | #define wd_cyl_lo 0x4 /* cylinder address, low byte (R/W) */ | |
23 | #define wd_cyl_hi 0x5 /* cylinder address, high byte (R/W)*/ | |
24 | #define wd_sdh 0x6 /* sector size/drive/head (R/W)*/ | |
25 | #define wd_command 0x7 /* command register (W) */ | |
26 | #define wd_status wd_command /* immediate status (R) */ | |
27 | ||
28 | #define wd_altsts 0x206 /*alternate fixed disk status(via 1015) (R)*/ | |
29 | #define wd_ctlr 0x206 /*fixed disk controller control(via 1015) (W)*/ | |
30 | #define wd_digin 0x207 /* disk controller input(via 1015) (R)*/ | |
31 | ||
32 | /* | |
33 | * Status Bits. | |
34 | */ | |
35 | #define WDCS_BUSY 0x80 /* Controller busy bit. */ | |
36 | #define WDCS_READY 0x40 /* Selected drive is ready */ | |
37 | #define WDCS_WRTFLT 0x20 /* Write fault */ | |
38 | #define WDCS_SEEKCMPLT 0x10 /* Seek complete */ | |
39 | #define WDCS_DRQ 0x08 /* Data request bit. */ | |
40 | #define WDCS_ECCCOR 0x04 /* ECC correction made in data */ | |
41 | #define WDCS_INDEX 0x02 /* Index pulse from selected drive */ | |
42 | #define WDCS_ERR 0x01 /* Error detect bit. */ | |
43 | ||
44 | #define WDCS_BITS "\020\010busy\006rdy\006wrtflt\005seekdone\004drq\003ecc_cor\002index\001err" | |
45 | ||
46 | #define WDERR_BITS "\020\010badblk\007uncorr\006id_crc\005no_id\003abort\002tr000\001no_dam" | |
47 | ||
48 | /* | |
49 | * Commands for Disk Controller. | |
50 | */ | |
51 | #define WDCC_READ 0x20 /* disk read code */ | |
52 | #define WDCC_WRITE 0x30 /* disk write code */ | |
53 | #define WDCC_RESTORE 0x10 /* disk restore code -- resets cntlr */ | |
54 | #define WDCC_FORMAT 0x50 /* disk format code */ | |
55 | ||
56 | #define WD_STEP 0 /* winchester- default 35us step */ | |
57 | ||
58 | #define WDSD_IBM 0xa0 /* forced to 512 byte sector, ecc */ | |
59 |