2 * pata_amd.c - AMD PATA for new ATA layer
3 * (C) 2005-2006 Red Hat Inc
4 * Alan Cox <alan@redhat.com>
6 * Based on pata-sil680. Errata information is taken from data sheets
7 * and the amd74xx.c driver by Vojtech Pavlik. Nvidia SATA devices are
8 * claimed by sata-nv.c.
11 * Variable system clock when/if it makes sense
12 * Power management on ports
15 * Documentation publically available.
18 #include <linux/kernel.h>
19 #include <linux/module.h>
20 #include <linux/pci.h>
21 #include <linux/init.h>
22 #include <linux/blkdev.h>
23 #include <linux/delay.h>
24 #include <scsi/scsi_host.h>
25 #include <linux/libata.h>
27 #define DRV_NAME "pata_amd"
28 #define DRV_VERSION "0.2.2"
31 * timing_setup - shared timing computation and load
32 * @ap: ATA port being set up
33 * @adev: drive being configured
34 * @offset: port offset
35 * @speed: target speed
36 * @clock: clock multiplier (number of times 33MHz for this part)
38 * Perform the actual timing set up for Nvidia or AMD PATA devices.
39 * The actual devices vary so they all call into this helper function
40 * providing the clock multipler and offset (because AMD and Nvidia put
41 * the ports at different locations).
44 static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offset, int speed, int clock)
46 static const unsigned char amd_cyc2udma[] = {
47 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7
50 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
51 struct ata_device *peer = ata_dev_pair(adev);
52 int dn = ap->port_no * 2 + adev->devno;
53 struct ata_timing at, apeer;
55 const int amd_clock = 33333; /* KHz. */
58 T = 1000000000 / amd_clock;
59 UT = T / min_t(int, max_t(int, clock, 1), 2);
61 if (ata_timing_compute(adev, speed, &at, T, UT) < 0) {
62 dev_printk(KERN_ERR, &pdev->dev, "unknown mode %d.\n", speed);
67 /* This may be over conservative */
69 ata_timing_compute(peer, peer->dma_mode, &apeer, T, UT);
70 ata_timing_merge(&apeer, &at, &at, ATA_TIMING_8BIT);
72 ata_timing_compute(peer, peer->pio_mode, &apeer, T, UT);
73 ata_timing_merge(&apeer, &at, &at, ATA_TIMING_8BIT);
76 if (speed == XFER_UDMA_5 && amd_clock <= 33333) at.udma = 1;
77 if (speed == XFER_UDMA_6 && amd_clock <= 33333) at.udma = 15;
80 * Now do the setup work
83 /* Configure the address set up timing */
84 pci_read_config_byte(pdev, offset + 0x0C, &t);
85 t = (t & ~(3 << ((3 - dn) << 1))) | ((FIT(at.setup, 1, 4) - 1) << ((3 - dn) << 1));
86 pci_write_config_byte(pdev, offset + 0x0C , t);
88 /* Configure the 8bit I/O timing */
89 pci_write_config_byte(pdev, offset + 0x0E + (1 - (dn >> 1)),
90 ((FIT(at.act8b, 1, 16) - 1) << 4) | (FIT(at.rec8b, 1, 16) - 1));
93 pci_write_config_byte(pdev, offset + 0x08 + (3 - dn),
94 ((FIT(at.active, 1, 16) - 1) << 4) | (FIT(at.recover, 1, 16) - 1));
98 t = at.udma ? (0xc0 | (FIT(at.udma, 2, 5) - 2)) : 0x03;
102 t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 2, 10)]) : 0x03;
106 t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 1, 10)]) : 0x03;
110 t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 1, 15)]) : 0x03;
118 pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
122 * amd_probe_init - cable detection
125 * Perform cable detection. The BIOS stores this in PCI config
129 static int amd_pre_reset(struct ata_port *ap)
131 static const u32 bitmask[2] = {0x03, 0xC0};
132 static const struct pci_bits amd_enable_bits[] = {
133 { 0x40, 1, 0x02, 0x02 },
134 { 0x40, 1, 0x01, 0x01 }
137 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
140 if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no])) {
141 ata_port_disable(ap);
142 printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
146 pci_read_config_byte(pdev, 0x42, &ata66);
147 if (ata66 & bitmask[ap->port_no])
148 ap->cbl = ATA_CBL_PATA80;
150 ap->cbl = ATA_CBL_PATA40;
151 return ata_std_prereset(ap);
155 static void amd_error_handler(struct ata_port *ap)
157 return ata_bmdma_drive_eh(ap, amd_pre_reset,
158 ata_std_softreset, NULL,
162 static int amd_early_pre_reset(struct ata_port *ap)
164 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
165 static struct pci_bits amd_enable_bits[] = {
166 { 0x40, 1, 0x02, 0x02 },
167 { 0x40, 1, 0x01, 0x01 }
170 if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no])) {
171 ata_port_disable(ap);
172 printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
175 /* No host side cable detection */
176 ap->cbl = ATA_CBL_PATA80;
177 return ata_std_prereset(ap);
181 static void amd_early_error_handler(struct ata_port *ap)
183 ata_bmdma_drive_eh(ap, amd_early_pre_reset,
184 ata_std_softreset, NULL,
189 * amd33_set_piomode - set initial PIO mode data
193 * Program the AMD registers for PIO mode.
196 static void amd33_set_piomode(struct ata_port *ap, struct ata_device *adev)
198 timing_setup(ap, adev, 0x40, adev->pio_mode, 1);
201 static void amd66_set_piomode(struct ata_port *ap, struct ata_device *adev)
203 timing_setup(ap, adev, 0x40, adev->pio_mode, 2);
206 static void amd100_set_piomode(struct ata_port *ap, struct ata_device *adev)
208 timing_setup(ap, adev, 0x40, adev->pio_mode, 3);
211 static void amd133_set_piomode(struct ata_port *ap, struct ata_device *adev)
213 timing_setup(ap, adev, 0x40, adev->pio_mode, 4);
217 * amd33_set_dmamode - set initial DMA mode data
221 * Program the MWDMA/UDMA modes for the AMD and Nvidia
225 static void amd33_set_dmamode(struct ata_port *ap, struct ata_device *adev)
227 timing_setup(ap, adev, 0x40, adev->dma_mode, 1);
230 static void amd66_set_dmamode(struct ata_port *ap, struct ata_device *adev)
232 timing_setup(ap, adev, 0x40, adev->dma_mode, 2);
235 static void amd100_set_dmamode(struct ata_port *ap, struct ata_device *adev)
237 timing_setup(ap, adev, 0x40, adev->dma_mode, 3);
240 static void amd133_set_dmamode(struct ata_port *ap, struct ata_device *adev)
242 timing_setup(ap, adev, 0x40, adev->dma_mode, 4);
247 * nv_probe_init - cable detection
250 * Perform cable detection. The BIOS stores this in PCI config
254 static int nv_pre_reset(struct ata_port *ap) {
255 static const u8 bitmask[2] = {0x03, 0xC0};
257 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
261 pci_read_config_byte(pdev, 0x52, &ata66);
262 if (ata66 & bitmask[ap->port_no])
263 ap->cbl = ATA_CBL_PATA80;
265 ap->cbl = ATA_CBL_PATA40;
267 /* We now have to double check because the Nvidia boxes BIOS
268 doesn't always set the cable bits but does set mode bits */
270 pci_read_config_word(pdev, 0x62 - 2 * ap->port_no, &udma);
271 if ((udma & 0xC4) == 0xC4 || (udma & 0xC400) == 0xC400)
272 ap->cbl = ATA_CBL_PATA80;
273 return ata_std_prereset(ap);
276 static void nv_error_handler(struct ata_port *ap)
278 ata_bmdma_drive_eh(ap, nv_pre_reset,
279 ata_std_softreset, NULL,
283 * nv100_set_piomode - set initial PIO mode data
287 * Program the AMD registers for PIO mode.
290 static void nv100_set_piomode(struct ata_port *ap, struct ata_device *adev)
292 timing_setup(ap, adev, 0x50, adev->pio_mode, 3);
295 static void nv133_set_piomode(struct ata_port *ap, struct ata_device *adev)
297 timing_setup(ap, adev, 0x50, adev->pio_mode, 4);
301 * nv100_set_dmamode - set initial DMA mode data
305 * Program the MWDMA/UDMA modes for the AMD and Nvidia
309 static void nv100_set_dmamode(struct ata_port *ap, struct ata_device *adev)
311 timing_setup(ap, adev, 0x50, adev->dma_mode, 3);
314 static void nv133_set_dmamode(struct ata_port *ap, struct ata_device *adev)
316 timing_setup(ap, adev, 0x50, adev->dma_mode, 4);
319 static struct scsi_host_template amd_sht = {
320 .module = THIS_MODULE,
322 .ioctl = ata_scsi_ioctl,
323 .queuecommand = ata_scsi_queuecmd,
324 .can_queue = ATA_DEF_QUEUE,
325 .this_id = ATA_SHT_THIS_ID,
326 .sg_tablesize = LIBATA_MAX_PRD,
327 .max_sectors = ATA_MAX_SECTORS,
328 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
329 .emulated = ATA_SHT_EMULATED,
330 .use_clustering = ATA_SHT_USE_CLUSTERING,
331 .proc_name = DRV_NAME,
332 .dma_boundary = ATA_DMA_BOUNDARY,
333 .slave_configure = ata_scsi_slave_config,
334 .bios_param = ata_std_bios_param,
337 static struct ata_port_operations amd33_port_ops = {
338 .port_disable = ata_port_disable,
339 .set_piomode = amd33_set_piomode,
340 .set_dmamode = amd33_set_dmamode,
341 .mode_filter = ata_pci_default_filter,
342 .tf_load = ata_tf_load,
343 .tf_read = ata_tf_read,
344 .check_status = ata_check_status,
345 .exec_command = ata_exec_command,
346 .dev_select = ata_std_dev_select,
348 .freeze = ata_bmdma_freeze,
349 .thaw = ata_bmdma_thaw,
350 .error_handler = amd_early_error_handler,
351 .post_internal_cmd = ata_bmdma_post_internal_cmd,
353 .bmdma_setup = ata_bmdma_setup,
354 .bmdma_start = ata_bmdma_start,
355 .bmdma_stop = ata_bmdma_stop,
356 .bmdma_status = ata_bmdma_status,
358 .qc_prep = ata_qc_prep,
359 .qc_issue = ata_qc_issue_prot,
360 .eng_timeout = ata_eng_timeout,
361 .data_xfer = ata_pio_data_xfer,
363 .irq_handler = ata_interrupt,
364 .irq_clear = ata_bmdma_irq_clear,
366 .port_start = ata_port_start,
367 .port_stop = ata_port_stop,
368 .host_stop = ata_host_stop
371 static struct ata_port_operations amd66_port_ops = {
372 .port_disable = ata_port_disable,
373 .set_piomode = amd66_set_piomode,
374 .set_dmamode = amd66_set_dmamode,
375 .mode_filter = ata_pci_default_filter,
376 .tf_load = ata_tf_load,
377 .tf_read = ata_tf_read,
378 .check_status = ata_check_status,
379 .exec_command = ata_exec_command,
380 .dev_select = ata_std_dev_select,
382 .freeze = ata_bmdma_freeze,
383 .thaw = ata_bmdma_thaw,
384 .error_handler = amd_early_error_handler,
385 .post_internal_cmd = ata_bmdma_post_internal_cmd,
387 .bmdma_setup = ata_bmdma_setup,
388 .bmdma_start = ata_bmdma_start,
389 .bmdma_stop = ata_bmdma_stop,
390 .bmdma_status = ata_bmdma_status,
392 .qc_prep = ata_qc_prep,
393 .qc_issue = ata_qc_issue_prot,
394 .eng_timeout = ata_eng_timeout,
395 .data_xfer = ata_pio_data_xfer,
397 .irq_handler = ata_interrupt,
398 .irq_clear = ata_bmdma_irq_clear,
400 .port_start = ata_port_start,
401 .port_stop = ata_port_stop,
402 .host_stop = ata_host_stop
405 static struct ata_port_operations amd100_port_ops = {
406 .port_disable = ata_port_disable,
407 .set_piomode = amd100_set_piomode,
408 .set_dmamode = amd100_set_dmamode,
409 .mode_filter = ata_pci_default_filter,
410 .tf_load = ata_tf_load,
411 .tf_read = ata_tf_read,
412 .check_status = ata_check_status,
413 .exec_command = ata_exec_command,
414 .dev_select = ata_std_dev_select,
416 .freeze = ata_bmdma_freeze,
417 .thaw = ata_bmdma_thaw,
418 .error_handler = amd_error_handler,
419 .post_internal_cmd = ata_bmdma_post_internal_cmd,
421 .bmdma_setup = ata_bmdma_setup,
422 .bmdma_start = ata_bmdma_start,
423 .bmdma_stop = ata_bmdma_stop,
424 .bmdma_status = ata_bmdma_status,
426 .qc_prep = ata_qc_prep,
427 .qc_issue = ata_qc_issue_prot,
428 .eng_timeout = ata_eng_timeout,
429 .data_xfer = ata_pio_data_xfer,
431 .irq_handler = ata_interrupt,
432 .irq_clear = ata_bmdma_irq_clear,
434 .port_start = ata_port_start,
435 .port_stop = ata_port_stop,
436 .host_stop = ata_host_stop
439 static struct ata_port_operations amd133_port_ops = {
440 .port_disable = ata_port_disable,
441 .set_piomode = amd133_set_piomode,
442 .set_dmamode = amd133_set_dmamode,
443 .mode_filter = ata_pci_default_filter,
444 .tf_load = ata_tf_load,
445 .tf_read = ata_tf_read,
446 .check_status = ata_check_status,
447 .exec_command = ata_exec_command,
448 .dev_select = ata_std_dev_select,
450 .freeze = ata_bmdma_freeze,
451 .thaw = ata_bmdma_thaw,
452 .error_handler = amd_error_handler,
453 .post_internal_cmd = ata_bmdma_post_internal_cmd,
455 .bmdma_setup = ata_bmdma_setup,
456 .bmdma_start = ata_bmdma_start,
457 .bmdma_stop = ata_bmdma_stop,
458 .bmdma_status = ata_bmdma_status,
460 .qc_prep = ata_qc_prep,
461 .qc_issue = ata_qc_issue_prot,
462 .eng_timeout = ata_eng_timeout,
463 .data_xfer = ata_pio_data_xfer,
465 .irq_handler = ata_interrupt,
466 .irq_clear = ata_bmdma_irq_clear,
468 .port_start = ata_port_start,
469 .port_stop = ata_port_stop,
470 .host_stop = ata_host_stop
473 static struct ata_port_operations nv100_port_ops = {
474 .port_disable = ata_port_disable,
475 .set_piomode = nv100_set_piomode,
476 .set_dmamode = nv100_set_dmamode,
477 .mode_filter = ata_pci_default_filter,
478 .tf_load = ata_tf_load,
479 .tf_read = ata_tf_read,
480 .check_status = ata_check_status,
481 .exec_command = ata_exec_command,
482 .dev_select = ata_std_dev_select,
484 .freeze = ata_bmdma_freeze,
485 .thaw = ata_bmdma_thaw,
486 .error_handler = nv_error_handler,
487 .post_internal_cmd = ata_bmdma_post_internal_cmd,
489 .bmdma_setup = ata_bmdma_setup,
490 .bmdma_start = ata_bmdma_start,
491 .bmdma_stop = ata_bmdma_stop,
492 .bmdma_status = ata_bmdma_status,
494 .qc_prep = ata_qc_prep,
495 .qc_issue = ata_qc_issue_prot,
496 .eng_timeout = ata_eng_timeout,
497 .data_xfer = ata_pio_data_xfer,
499 .irq_handler = ata_interrupt,
500 .irq_clear = ata_bmdma_irq_clear,
502 .port_start = ata_port_start,
503 .port_stop = ata_port_stop,
504 .host_stop = ata_host_stop
507 static struct ata_port_operations nv133_port_ops = {
508 .port_disable = ata_port_disable,
509 .set_piomode = nv133_set_piomode,
510 .set_dmamode = nv133_set_dmamode,
511 .mode_filter = ata_pci_default_filter,
512 .tf_load = ata_tf_load,
513 .tf_read = ata_tf_read,
514 .check_status = ata_check_status,
515 .exec_command = ata_exec_command,
516 .dev_select = ata_std_dev_select,
518 .freeze = ata_bmdma_freeze,
519 .thaw = ata_bmdma_thaw,
520 .error_handler = nv_error_handler,
521 .post_internal_cmd = ata_bmdma_post_internal_cmd,
523 .bmdma_setup = ata_bmdma_setup,
524 .bmdma_start = ata_bmdma_start,
525 .bmdma_stop = ata_bmdma_stop,
526 .bmdma_status = ata_bmdma_status,
528 .qc_prep = ata_qc_prep,
529 .qc_issue = ata_qc_issue_prot,
530 .eng_timeout = ata_eng_timeout,
531 .data_xfer = ata_pio_data_xfer,
533 .irq_handler = ata_interrupt,
534 .irq_clear = ata_bmdma_irq_clear,
536 .port_start = ata_port_start,
537 .port_stop = ata_port_stop,
538 .host_stop = ata_host_stop
541 static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
543 static struct ata_port_info info[10] = {
546 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
548 .mwdma_mask = 0x07, /* No SWDMA */
549 .udma_mask = 0x07, /* UDMA 33 */
550 .port_ops = &amd33_port_ops
552 { /* 1: Early AMD7409 - no swdma */
554 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
557 .udma_mask = 0x1f, /* UDMA 66 */
558 .port_ops = &amd66_port_ops
560 { /* 2: AMD 7409, no swdma errata */
562 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
565 .udma_mask = 0x1f, /* UDMA 66 */
566 .port_ops = &amd66_port_ops
570 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
573 .udma_mask = 0x3f, /* UDMA 100 */
574 .port_ops = &amd100_port_ops
578 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
581 .udma_mask = 0x3f, /* UDMA 100 */
582 .port_ops = &amd100_port_ops
586 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
589 .udma_mask = 0x7f, /* UDMA 133, no swdma */
590 .port_ops = &amd133_port_ops
592 { /* 6: AMD 8111 UDMA 100 (Serenade) */
594 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
597 .udma_mask = 0x3f, /* UDMA 100, no swdma */
598 .port_ops = &amd133_port_ops
600 { /* 7: Nvidia Nforce */
602 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
605 .udma_mask = 0x3f, /* UDMA 100 */
606 .port_ops = &nv100_port_ops
608 { /* 8: Nvidia Nforce2 and later */
610 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
613 .udma_mask = 0x7f, /* UDMA 133, no swdma */
614 .port_ops = &nv133_port_ops
616 { /* 9: AMD CS5536 (Geode companion) */
618 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
621 .udma_mask = 0x3f, /* UDMA 100 */
622 .port_ops = &amd100_port_ops
625 static struct ata_port_info *port_info[2];
626 static int printed_version;
627 int type = id->driver_data;
631 if (!printed_version++)
632 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
634 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
635 pci_read_config_byte(pdev, 0x41, &fifo);
637 /* Check for AMD7409 without swdma errata and if found adjust type */
638 if (type == 1 && rev > 0x7)
641 /* Check for AMD7411 */
644 pci_write_config_byte(pdev, 0x41, fifo & 0x0F);
646 pci_write_config_byte(pdev, 0x41, fifo | 0xF0);
649 if (type == 5 && pdev->subsystem_vendor == PCI_VENDOR_ID_AMD &&
650 pdev->subsystem_device == PCI_DEVICE_ID_AMD_SERENADE)
651 type = 6; /* UDMA 100 only */
654 ata_pci_clear_simplex(pdev);
658 port_info[0] = port_info[1] = &info[type];
659 return ata_pci_init_one(pdev, port_info, 2);
662 static const struct pci_device_id amd[] = {
663 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_COBRA_7401, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
664 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7409, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
665 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7411, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
666 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_OPUS_7441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
667 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
668 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 },
669 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
670 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
671 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
672 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
673 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
674 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
675 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
676 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
677 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
678 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 },
682 static struct pci_driver amd_pci_driver = {
685 .probe = amd_init_one,
686 .remove = ata_pci_remove_one
689 static int __init amd_init(void)
691 return pci_register_driver(&amd_pci_driver);
694 static void __exit amd_exit(void)
696 pci_unregister_driver(&amd_pci_driver);
700 MODULE_AUTHOR("Alan Cox");
701 MODULE_DESCRIPTION("low-level driver for AMD PATA IDE");
702 MODULE_LICENSE("GPL");
703 MODULE_DEVICE_TABLE(pci, amd);
704 MODULE_VERSION(DRV_VERSION);
706 module_init(amd_init);
707 module_exit(amd_exit);