aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
authorMathias Kretschmer <posting@blx4.net>2005-11-19 15:32:38 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2005-11-19 15:32:38 -0500
commit4f1d774aadfc5a6ed1545dca180f66ab6d0f543d (patch)
treee2e2e49c3154d45af2ff821cf7f815f93216b567 /drivers/ide/pci
parentb286e39207237e2f6929959372bf66d9a8d05a82 (diff)
[PATCH] via82cxxx: add VIA VT6410 IDE support
From: Mathias Kretschmer <posting@blx4.net> Signed-off-by: Daniel Drake <dsd@gentoo.org> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/via82cxxx.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index cee2c374cd2f..7161ce0ef5aa 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -79,6 +79,7 @@ static struct via_isa_bridge {
79 u8 rev_max; 79 u8 rev_max;
80 u16 flags; 80 u16 flags;
81} via_isa_bridges[] = { 81} via_isa_bridges[] = {
82 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
82 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 83 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
83 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 84 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
84 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 85 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -467,24 +468,35 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
467 hwif->drives[1].autodma = hwif->autodma; 468 hwif->drives[1].autodma = hwif->autodma;
468} 469}
469 470
470static ide_pci_device_t via82cxxx_chipset __devinitdata = { 471static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
471 .name = "VP_IDE", 472 { /* 0 */
472 .init_chipset = init_chipset_via82cxxx, 473 .name = "VP_IDE",
473 .init_hwif = init_hwif_via82cxxx, 474 .init_chipset = init_chipset_via82cxxx,
474 .channels = 2, 475 .init_hwif = init_hwif_via82cxxx,
475 .autodma = NOAUTODMA, 476 .channels = 2,
476 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, 477 .autodma = NOAUTODMA,
477 .bootable = ON_BOARD, 478 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
479 .bootable = ON_BOARD
480 },{ /* 1 */
481 .name = "VP_IDE",
482 .init_chipset = init_chipset_via82cxxx,
483 .init_hwif = init_hwif_via82cxxx,
484 .channels = 2,
485 .autodma = AUTODMA,
486 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
487 .bootable = ON_BOARD,
488 }
478}; 489};
479 490
480static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) 491static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
481{ 492{
482 return ide_setup_pci_device(dev, &via82cxxx_chipset); 493 return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
483} 494}
484 495
485static struct pci_device_id via_pci_tbl[] = { 496static struct pci_device_id via_pci_tbl[] = {
486 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 497 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
487 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 498 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
499 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
488 { 0, }, 500 { 0, },
489}; 501};
490MODULE_DEVICE_TABLE(pci, via_pci_tbl); 502MODULE_DEVICE_TABLE(pci, via_pci_tbl);