1 #ifndef _LINUX_FDREG_H
2 #define _LINUX_FDREG_H
3
4
5
6
7
8
9 extern int ticks_to_floppy_on(unsigned int nr);
10 extern void floppy_on(unsigned int nr);
11 extern void floppy_off(unsigned int nr);
12 extern void floppy_select(unsigned int nr);
13 extern void floppy_deselect(unsigned int nr);
14
15
16 #define FD_STATUS 0x3f4
17 #define FD_DATA 0x3f5
18 #define FD_DOR 0x3f2
19 #define FD_DIR 0x3f7
20 #define FD_DCR 0x3f7
21
22
23 #define STATUS_BUSYMASK 0x0F
24 #define STATUS_BUSY 0x10
25 #define STATUS_DMA 0x20
26 #define STATUS_DIR 0x40
27 #define STATUS_READY 0x80
28
29
30 #define ST0_DS 0x03
31 #define ST0_HA 0x04
32 #define ST0_NR 0x08
33 #define ST0_ECE 0x10
34 #define ST0_SE 0x20
35 #define ST0_INTR 0xC0
36
37
38 #define ST1_MAM 0x01
39 #define ST1_WP 0x02
40 #define ST1_ND 0x04
41 #define ST1_OR 0x10
42 #define ST1_CRC 0x20
43 #define ST1_EOC 0x80
44
45
46 #define ST2_MAM 0x01
47 #define ST2_BC 0x02
48 #define ST2_SNS 0x04
49 #define ST2_SEH 0x08
50 #define ST2_WC 0x10
51 #define ST2_CRC 0x20
52 #define ST2_CM 0x40
53
54
55 #define ST3_HA 0x04
56 #define ST3_TZ 0x10
57 #define ST3_WP 0x40
58
59
60 #define FD_RECALIBRATE 0x07
61 #define FD_SEEK 0x0F
62 #define FD_READ 0xE6
63 #define FD_WRITE 0xC5
64 #define FD_SENSEI 0x08
65 #define FD_SPECIFY 0x03
66 #define FD_FORMAT 0x4D
67 #define FD_VERSION 0x10
68 #define FD_CONFIGURE 0x13
69 #define FD_PERPENDICULAR 0x12
70
71
72 #define DMA_READ 0x46
73 #define DMA_WRITE 0x4A
74
75
76 #define FDC_TYPE_STD 0x80
77 #define FDC_TYPE_82077 0x90
78
79 #endif