1 #ifndef AMD74XX_H
2 #define AMD74XX_H
3 
4 #include <linux/config.h>
5 #include <linux/pci.h>
6 #include <linux/ide.h>
7 
8 #define DISPLAY_AMD_TIMINGS
9 
10 #if defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS)
11 #include <linux/stat.h>
12 #include <linux/proc_fs.h>
13 
14 static u8 amd74xx_proc;
15 
16 static int amd74xx_get_info(char *, char **, off_t, int);
17 
18 static ide_pci_host_proc_t amd74xx_procs[] __initdata = {
19 	{
20 		.name		= "amd74xx",
21 		.set		= 1,
22 		.get_info	= amd74xx_get_info,
23 		.parent		= NULL,
24 	},
25 };
26 #endif  /* defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS) */
27 
28 static unsigned int init_chipset_amd74xx(struct pci_dev *, const char *);
29 static void init_hwif_amd74xx(ide_hwif_t *);
30 
31 static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
32 	{	/* 0 */
33 		.vendor		= PCI_VENDOR_ID_AMD,
34 		.device		= PCI_DEVICE_ID_AMD_COBRA_7401,
35 		.name		= "AMD7401",
36 		.init_chipset	= init_chipset_amd74xx,
37 		.init_hwif	= init_hwif_amd74xx,
38 		.channels	= 2,
39 		.autodma	= AUTODMA,
40 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
41 		.bootable	= ON_BOARD,
42 		.extra		= 0
43 	},{	/* 1 */
44 		.vendor		= PCI_VENDOR_ID_AMD,
45 		.device		= PCI_DEVICE_ID_AMD_VIPER_7409,
46 		.name		= "AMD7409",
47 		.init_chipset	= init_chipset_amd74xx,
48 		.init_hwif	= init_hwif_amd74xx,
49 		.channels	= 2,
50 		.autodma	= AUTODMA,
51 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
52 		.bootable	= ON_BOARD,
53 		.extra		= 0
54 	},{	/* 2 */
55 		.vendor		= PCI_VENDOR_ID_AMD,
56 		.device		= PCI_DEVICE_ID_AMD_VIPER_7411,
57 		.name		= "AMD7411",
58 		.init_chipset	= init_chipset_amd74xx,
59 		.init_hwif	= init_hwif_amd74xx,
60 		.channels	= 2,
61 		.autodma	= AUTODMA,
62 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
63 		.bootable	= ON_BOARD,
64 		.extra		= 0
65 	},{	/* 3 */
66 		.vendor		= PCI_VENDOR_ID_AMD,
67 		.device		= PCI_DEVICE_ID_AMD_OPUS_7441,
68 		.name		= "AMD7441",
69 		.init_chipset	= init_chipset_amd74xx,
70 		.init_hwif	= init_hwif_amd74xx,
71 		.channels	= 2,
72 		.autodma	= AUTODMA,
73 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
74 		.bootable	= ON_BOARD,
75 		.extra		= 0
76 	},{	/* 4 */
77 		.vendor		= PCI_VENDOR_ID_AMD,
78 		.device		= PCI_DEVICE_ID_AMD_8111_IDE,
79 		.name		= "AMD8111",
80 		.init_chipset	= init_chipset_amd74xx,
81 		.init_hwif	= init_hwif_amd74xx,
82 		.autodma	= AUTODMA,
83 		.channels	= 2,
84 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
85 		.bootable	= ON_BOARD,
86 		.extra		= 0
87 	},
88 	{	/* 5 */
89 		.vendor		= PCI_VENDOR_ID_NVIDIA,
90 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_IDE,
91 		.name		= "NFORCE",
92 		.init_chipset	= init_chipset_amd74xx,
93 		.init_hwif	= init_hwif_amd74xx,
94 		.channels	= 2,
95 		.autodma	= AUTODMA,
96 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
97 		.bootable	= ON_BOARD,
98 		.extra		= 0,
99 	},
100 	{	/* 6 */
101 		.vendor		= PCI_VENDOR_ID_NVIDIA,
102 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE,
103 		.name		= "NFORCE2",
104 		.init_chipset	= init_chipset_amd74xx,
105 		.init_hwif	= init_hwif_amd74xx,
106 		.channels	= 2,
107 		.autodma	= AUTODMA,
108 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
109 		.bootable	= ON_BOARD,
110 		.extra		= 0,
111 	},
112 	{	/* 7 */
113 		.vendor		= PCI_VENDOR_ID_NVIDIA,
114 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE,
115 		.name		= "NFORCE2-U400R",
116 		.init_chipset	= init_chipset_amd74xx,
117 		.init_hwif	= init_hwif_amd74xx,
118 		.channels	= 2,
119 		.autodma	= AUTODMA,
120 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
121 		.bootable	= ON_BOARD,
122 	},
123 	{	/* 8 */
124 		.vendor		= PCI_VENDOR_ID_NVIDIA,
125 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA,
126 		.name		= "NFORCE2-U400R-SATA",
127 		.init_chipset	= init_chipset_amd74xx,
128 		.init_hwif	= init_hwif_amd74xx,
129 		.channels	= 2,
130 		.autodma	= AUTODMA,
131 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
132 		.bootable	= ON_BOARD,
133 	},
134 	{	/* 9 */
135 		.vendor		= PCI_VENDOR_ID_NVIDIA,
136 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE,
137 		.name		= "NFORCE3-150",
138 		.init_chipset	= init_chipset_amd74xx,
139 		.init_hwif	= init_hwif_amd74xx,
140 		.channels	= 2,
141 		.autodma	= AUTODMA,
142 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
143 		.bootable	= ON_BOARD,
144 	},
145 	{	/* 10 */
146 		.vendor		= PCI_VENDOR_ID_NVIDIA,
147 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE,
148 		.name		= "NFORCE3-250",
149 		.init_chipset	= init_chipset_amd74xx,
150 		.init_hwif	= init_hwif_amd74xx,
151 		.channels	= 2,
152 		.autodma	= AUTODMA,
153 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
154 		.bootable	= ON_BOARD,
155 	},
156 	{	/* 11 */
157 		.vendor		= PCI_VENDOR_ID_NVIDIA,
158 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA,
159 		.name		= "NFORCE3-250-SATA",
160 		.init_chipset	= init_chipset_amd74xx,
161 		.init_hwif	= init_hwif_amd74xx,
162 		.channels	= 2,
163 		.autodma	= AUTODMA,
164 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
165 		.bootable	= ON_BOARD,
166 	},
167 	{	/* 12 */
168 		.vendor		= PCI_VENDOR_ID_NVIDIA,
169 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2,
170 		.name		= "NFORCE3-250-SATA2",
171 		.init_chipset	= init_chipset_amd74xx,
172 		.init_hwif	= init_hwif_amd74xx,
173 		.channels	= 2,
174 		.autodma	= AUTODMA,
175 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
176 		.bootable	= ON_BOARD,
177 	},
178 	{	/* 13 */
179 		.vendor		= PCI_VENDOR_ID_NVIDIA,
180 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE,
181 		.name		= "NFORCE-CK804",
182 		.init_chipset	= init_chipset_amd74xx,
183 		.init_hwif	= init_hwif_amd74xx,
184 		.channels	= 2,
185 		.autodma	= AUTODMA,
186 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
187 		.bootable	= ON_BOARD,
188 	},
189 	{	/* 14 */
190 		.vendor		= PCI_VENDOR_ID_NVIDIA,
191 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE,
192 		.name		= "NFORCE-MCP04",
193 		.init_chipset	= init_chipset_amd74xx,
194 		.init_hwif	= init_hwif_amd74xx,
195 		.channels	= 2,
196 		.autodma	= AUTODMA,
197 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
198 		.bootable	= ON_BOARD,
199 	},
200 	{	/* 15 */
201 		.vendor		= PCI_VENDOR_ID_NVIDIA,
202 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE,
203 		.name		= "NFORCE-MCP51",
204 		.init_chipset	= init_chipset_amd74xx,
205 		.init_hwif	= init_hwif_amd74xx,
206 		.channels	= 2,
207 		.autodma	= AUTODMA,
208 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
209 		.bootable	= ON_BOARD,
210 	},
211 	{	/* 16 */
212 		.vendor		= PCI_VENDOR_ID_NVIDIA,
213 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE,
214 		.name		= "NFORCE-MCP55",
215 		.init_chipset	= init_chipset_amd74xx,
216 		.init_hwif	= init_hwif_amd74xx,
217 		.channels	= 2,
218 		.autodma	= AUTODMA,
219 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
220 		.bootable	= ON_BOARD,
221 	},
222 	{	/* 17 */
223 		.vendor		= PCI_VENDOR_ID_NVIDIA,
224 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE,
225 		.name		= "NFORCE-MCP61",
226 		.init_chipset	= init_chipset_amd74xx,
227 		.init_hwif	= init_hwif_amd74xx,
228 		.channels	= 2,
229 		.autodma	= AUTODMA,
230 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
231 		.bootable	= ON_BOARD,
232 	},
233 	{	/* 18 */
234 		.vendor		= PCI_VENDOR_ID_NVIDIA,
235 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE,
236 		.name		= "NFORCE-MCP65",
237 		.init_chipset	= init_chipset_amd74xx,
238 		.init_hwif	= init_hwif_amd74xx,
239 		.channels	= 2,
240 		.autodma	= AUTODMA,
241 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
242 		.bootable	= ON_BOARD,
243 	},
244 	{	/* 19 */
245 		.vendor		= PCI_VENDOR_ID_NVIDIA,
246 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE,
247 		.name		= "NFORCE-MCP67",
248 		.init_chipset	= init_chipset_amd74xx,
249 		.init_hwif	= init_hwif_amd74xx,
250 		.channels	= 2,
251 		.autodma	= AUTODMA,
252 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
253 		.bootable	= ON_BOARD,
254 	},
255 	{	/* 20 */
256 		.vendor		= PCI_VENDOR_ID_NVIDIA,
257 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE,
258 		.name		= "NFORCE-MCP73",
259 		.init_chipset	= init_chipset_amd74xx,
260 		.init_hwif	= init_hwif_amd74xx,
261 		.channels	= 2,
262 		.autodma	= AUTODMA,
263 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
264 		.bootable	= ON_BOARD,
265 	},
266 	{	/* 21 */
267 		.vendor		= PCI_VENDOR_ID_NVIDIA,
268 		.device		= PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE,
269 		.name		= "NFORCE-MCP77",
270 		.init_chipset	= init_chipset_amd74xx,
271 		.init_hwif	= init_hwif_amd74xx,
272 		.channels	= 2,
273 		.autodma	= AUTODMA,
274 		.enablebits	= {{0x50,0x02,0x02}, {0x50,0x01,0x01}},
275 		.bootable	= ON_BOARD,
276 	},
277 	{	/* 22 */
278 		.vendor		= PCI_VENDOR_ID_AMD,
279 		.device		= PCI_DEVICE_ID_AMD_CS5536_IDE,
280 		.name		= "AMD-CS5536",
281 		.init_chipset	= init_chipset_amd74xx,
282 		.init_hwif	= init_hwif_amd74xx,
283 		.channels	= 2,
284 		.autodma	= AUTODMA,
285 		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
286 		.bootable	= ON_BOARD,
287 	},
288 	{
289 		.vendor		= 0,
290 		.device		= 0,
291 		.channels	= 0,
292 		.bootable	= EOL,
293 	}
294 };
295 
296 #endif /* AMD74XX_H */
297