This source file includes following definitions.
- QD_TIMING
- QD_TIMREG
1
2
3
4
5
6
7
8
9
10
11
12 #define IDE_IN(a,b,c) ( ((a)<(b)) ? (b) : ( (a)>(c) ? (c) : (a)) )
13
14 #define IDE_IMPLY(a,b) ((!(a)) || (b))
15
16 #define QD_TIM1_PORT (base)
17 #define QD_CONFIG_PORT (base+0x01)
18 #define QD_TIM2_PORT (base+0x02)
19 #define QD_CONTROL_PORT (base+0x03)
20
21 #define QD_CONFIG_IDE_BASEPORT 0x01
22 #define QD_CONFIG_BASEPORT 0x02
23 #define QD_CONFIG_ID3 0x04
24 #define QD_CONFIG_DISABLED 0x08
25 #define QD_CONFIG_QD6500 0xc0
26 #define QD_CONFIG_QD6580_A 0xa0
27 #define QD_CONFIG_QD6580_B 0x50
28
29 #define QD_CONTR_SEC_DISABLED 0x01
30
31 #define QD_ID3 ((config & QD_CONFIG_ID3)!=0)
32
33 #define QD_CONFIG(hwif) ((hwif)->config_data & 0x00ff)
34
35 static inline u8 QD_TIMING(ide_drive_t *drive)
36 {
37 return (unsigned long)ide_get_drivedata(drive) & 0x00ff;
38 }
39
40 static inline u8 QD_TIMREG(ide_drive_t *drive)
41 {
42 return ((unsigned long)ide_get_drivedata(drive) & 0xff00) >> 8;
43 }
44
45 #define QD6500_DEF_DATA ((QD_TIM1_PORT<<8) | (QD_ID3 ? 0x0c : 0x08))
46 #define QD6580_DEF_DATA ((QD_TIM1_PORT<<8) | (QD_ID3 ? 0x0a : 0x00))
47 #define QD6580_DEF_DATA2 ((QD_TIM2_PORT<<8) | (QD_ID3 ? 0x0a : 0x00))
48 #define QD_DEF_CONTR (0x40 | ((control & 0x02) ? 0x9f : 0x1f))
49
50 #define QD_TESTVAL 0x19
51
52
53
54 static struct qd65xx_timing_s {
55 s8 offset;
56 char model[4];
57 s16 active;
58 s16 recovery;
59 } qd65xx_timing [] = {
60 { 30, "2040", 110, 225 },
61 { 30, "2045", 135, 225 },
62 { 30, "1040", 155, 325 },
63 { 30, "1047", 135, 265 },
64 { 30, "5344", 135, 225 },
65 { 30, "01 4", 175, 405 },
66 { 27, "C030", 175, 375 },
67 { 8, "PL42", 110, 295 },
68 { 8, "PL21", 110, 315 },
69 { 8, "PL25", 175, 385 },
70 { 4, "PA24", 110, 285 },
71 { 6, "2200", 110, 260 },
72 { 6, "3204", 110, 235 },
73 { 6, "1202", 110, 265 },
74 { 0, "DS3-", 135, 315 },
75 { 8, "KM32", 175, 355 },
76 { 2, "53A1", 175, 355 },
77 { 2, "4108", 175, 295 },
78 { 2, "1344", 175, 335 },
79 { 6, "7 12", 110, 225 },
80 { 30, "02F4", 145, 295 },
81 { 2, "1302", 175, 335 },
82 { 2, "2334", 145, 265 },
83 { 2, "2338", 145, 275 },
84 { 2, "3309", 145, 275 },
85 { 2, "5305", 145, 275 },
86 { 2, "4100", 175, 295 },
87 { 2, "4110", 175, 295 },
88 { 2, "6300", 135, 265 },
89 { 2, "5300", 135, 265 },
90 { 6, "7 31", 135, 225 },
91 { 6, "7 43", 115, 265 },
92 { 6, "7 42", 110, 255 },
93 { 6, "3 04", 135, 265 },
94 { 6, "61 0", 135, 285 },
95 { 6, "1107", 135, 235 },
96 { 6, "2101", 110, 220 },
97 { 6, "4202", 135, 245 },
98 { 6, "41 0", 175, 355 },
99 { 6, "82 0", 175, 355 },
100 { 8, "PL01", 175, 375 },
101 { 8, "PL25", 110, 295 },
102 { 10, "4S 2", 175, 385 },
103 { 10, "8S 5", 175, 385 },
104 { 10, "1S72", 175, 385 },
105 { 10, "1S07", 175, 385 },
106 { 8, "ZE42", 135, 295 },
107 { 8, "ZE21", 175, 385 },
108 { 8, "ZE58", 175, 385 },
109 { 8, "ZE24", 175, 385 },
110 { 27, "C036", 155, 325 },
111 { 27, "C038", 155, 325 },
112 { 6, "2205", 110, 255 },
113 { 2, " CHA", 140, 415 },
114 { 2, " CLA", 140, 415 },
115 { 4, "UC41", 140, 415 },
116 { 6, "1207", 130, 275 },
117 { 6, "2107", 130, 275 },
118 { 6, "5204", 130, 275 },
119 { 30, "3004", 110, 235 },
120 { 30, "0345", 135, 255 },
121 { 12, "12A3", 175, 320 },
122 { 12, "43A0", 145, 240 },
123 { 6, "7 21", 180, 290 },
124 { 6, "7 71", 135, 240 },
125 { 12, "45\0000", 110, 205 },
126 { 8, "PL11", 180, 290 },
127 { 8, "OG21", 150, 275 },
128 { 12, "42A5", 175, 320 },
129 { 2, "2309", 175, 295 },
130 { 2, "3358", 180, 310 },
131 { 2, "6355", 180, 310 },
132 { 2, "1900", 175, 270 },
133 { 2, "1954", 175, 270 },
134 { 2, "1909", 175, 270 },
135 { 2, "2953", 175, 270 },
136 { 2, "1359", 175, 270 },
137 { 24, "3R11", 175, 290 },
138 { 0, "2M26", 175, 215 },
139 { 4, "2253", 175, 300 },
140 { 4, "-32A", 145, 245 },
141 { 30, "0326", 150, 270 },
142 { 30, "3044", 110, 195 },
143 { 30, "43A0", 110, 195 },
144 { -1, " ", 175, 415 }
145 };