1 #ifndef _LINUX_FDREG_H
2 #define _LINUX_FDREG_H
3
4
5
6
7
8
9 #ifdef FDPATCHES
10
11 #define FD_IOPORT fdc_state[fdc].address
12
13
14 #define FD_STATUS (4 + FD_IOPORT )
15 #define FD_DATA (5 + FD_IOPORT )
16
17
18 #define FD_DOR (2 + FD_IOPORT )
19
20
21 #define FD_DIR (7 + FD_IOPORT )
22
23
24 #define FD_DCR (7 + FD_IOPORT )
25
26 #else
27
28 #define FD_STATUS 0x3f4
29 #define FD_DATA 0x3f5
30 #define FD_DOR 0x3f2
31 #define FD_DIR 0x3f7
32 #define FD_DCR 0x3f7
33
34 #endif
35
36
37 #define STATUS_BUSYMASK 0x0F
38 #define STATUS_BUSY 0x10
39 #define STATUS_DMA 0x20
40 #define STATUS_DIR 0x40
41 #define STATUS_READY 0x80
42
43
44 #define ST0_DS 0x03
45 #define ST0_HA 0x04
46 #define ST0_NR 0x08
47 #define ST0_ECE 0x10
48 #define ST0_SE 0x20
49 #define ST0_INTR 0xC0
50
51
52 #define ST1_MAM 0x01
53 #define ST1_WP 0x02
54 #define ST1_ND 0x04
55 #define ST1_OR 0x10
56 #define ST1_CRC 0x20
57 #define ST1_EOC 0x80
58
59
60 #define ST2_MAM 0x01
61 #define ST2_BC 0x02
62 #define ST2_SNS 0x04
63 #define ST2_SEH 0x08
64 #define ST2_WC 0x10
65 #define ST2_CRC 0x20
66 #define ST2_CM 0x40
67
68
69 #define ST3_HA 0x04
70 #define ST3_DS 0x08
71 #define ST3_TZ 0x10
72 #define ST3_RY 0x20
73 #define ST3_WP 0x40
74 #define ST3_FT 0x80
75
76
77 #define FD_RECALIBRATE 0x07
78 #define FD_SEEK 0x0F
79 #define FD_READ 0xE6
80 #define FD_WRITE 0xC5
81 #define FD_SENSEI 0x08
82 #define FD_SPECIFY 0x03
83 #define FD_FORMAT 0x4D
84 #define FD_VERSION 0x10
85 #define FD_CONFIGURE 0x13
86 #define FD_PERPENDICULAR 0x12
87 #define FD_GETSTATUS 0x04
88 #define FD_DUMPREGS 0x0E
89 #define FD_READID 0xEA
90 #define FD_UNLOCK 0x14
91 #define FD_LOCK 0x94
92 #define FD_RSEEK_OUT 0x8f
93 #define FD_RSEEK_IN 0xcf
94
95
96 #define DMA_READ 0x46
97 #define DMA_WRITE 0x4A
98
99
100 #define FDC_NONE 0x00
101 #define FDC_UNKNOWN 0x10
102 #define FDC_8272A 0x20
103 #define FDC_765ED 0x30
104 #define FDC_82072 0x40
105 #define FDC_82077_ORIG 0x50
106 #define FDC_82077 0x52
107
108 #define FD_RESET_DELAY 20
109 #endif