aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/via82cxxx.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index 028de26a25fe..29f3be311f8d 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -6,7 +6,7 @@
6 * vt8235, vt8237, vt8237a 6 * vt8235, vt8237, vt8237a
7 * 7 *
8 * Copyright (c) 2000-2002 Vojtech Pavlik 8 * Copyright (c) 2000-2002 Vojtech Pavlik
9 * Copyright (c) 2007 Bartlomiej Zolnierkiewicz 9 * Copyright (c) 2007-2010 Bartlomiej Zolnierkiewicz
10 * 10 *
11 * Based on the work of: 11 * Based on the work of:
12 * Michel Aubry 12 * Michel Aubry
@@ -55,6 +55,10 @@
55#define VIA_BAD_ID 0x10 /* Has wrong vendor ID (0x1107) */ 55#define VIA_BAD_ID 0x10 /* Has wrong vendor ID (0x1107) */
56#define VIA_BAD_AST 0x20 /* Don't touch Address Setup Timing */ 56#define VIA_BAD_AST 0x20 /* Don't touch Address Setup Timing */
57 57
58enum {
59 VIA_IDFLAG_SINGLE = (1 << 1), /* single channel controller */
60};
61
58/* 62/*
59 * VIA SouthBridge chips. 63 * VIA SouthBridge chips.
60 */ 64 */
@@ -436,10 +440,13 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
436 via_clock = 33333; 440 via_clock = 33333;
437 } 441 }
438 442
439 if (idx == 0) 443 if (idx == 1)
440 d.host_flags |= IDE_HFLAG_NO_AUTODMA;
441 else
442 d.enablebits[1].reg = d.enablebits[0].reg = 0; 444 d.enablebits[1].reg = d.enablebits[0].reg = 0;
445 else
446 d.host_flags |= IDE_HFLAG_NO_AUTODMA;
447
448 if (idx == VIA_IDFLAG_SINGLE)
449 d.host_flags |= IDE_HFLAG_SINGLE;
443 450
444 if ((via_config->flags & VIA_NO_UNMASK) == 0) 451 if ((via_config->flags & VIA_NO_UNMASK) == 0)
445 d.host_flags |= IDE_HFLAG_UNMASK_IRQS; 452 d.host_flags |= IDE_HFLAG_UNMASK_IRQS;
@@ -475,7 +482,7 @@ static const struct pci_device_id via_pci_tbl[] = {
475 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, 482 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 },
476 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, 483 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 },
477 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 }, 484 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 },
478 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_VX855_IDE), 0 }, 485 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_VX855_IDE), VIA_IDFLAG_SINGLE },
479 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 }, 486 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 },
480 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 }, 487 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 },
481 { 0, }, 488 { 0, },
@@ -504,6 +511,6 @@ static void __exit via_ide_exit(void)
504module_init(via_ide_init); 511module_init(via_ide_init);
505module_exit(via_ide_exit); 512module_exit(via_ide_exit);
506 513
507MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick"); 514MODULE_AUTHOR("Vojtech Pavlik, Bartlomiej Zolnierkiewicz, Michel Aubry, Jeff Garzik, Andre Hedrick");
508MODULE_DESCRIPTION("PCI driver module for VIA IDE"); 515MODULE_DESCRIPTION("PCI driver module for VIA IDE");
509MODULE_LICENSE("GPL"); 516MODULE_LICENSE("GPL");