diff options
Diffstat (limited to 'drivers/ata/pata_via.c')
-rw-r--r-- | drivers/ata/pata_via.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 681169c9c640..ba556d3e6963 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -86,6 +86,10 @@ enum { | |||
86 | VIA_SATA_PATA = 0x800, /* SATA/PATA combined configuration */ | 86 | VIA_SATA_PATA = 0x800, /* SATA/PATA combined configuration */ |
87 | }; | 87 | }; |
88 | 88 | ||
89 | enum { | ||
90 | VIA_IDFLAG_SINGLE = (1 << 0), /* single channel controller) */ | ||
91 | }; | ||
92 | |||
89 | /* | 93 | /* |
90 | * VIA SouthBridge chips. | 94 | * VIA SouthBridge chips. |
91 | */ | 95 | */ |
@@ -97,12 +101,17 @@ static const struct via_isa_bridge { | |||
97 | u8 rev_max; | 101 | u8 rev_max; |
98 | u16 flags; | 102 | u16 flags; |
99 | } via_isa_bridges[] = { | 103 | } via_isa_bridges[] = { |
104 | { "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, | ||
105 | VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, | ||
100 | { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | | 106 | { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | |
101 | VIA_BAD_AST | VIA_SATA_PATA }, | 107 | VIA_BAD_AST | VIA_SATA_PATA }, |
108 | { "vt8261", PCI_DEVICE_ID_VIA_8261, 0x00, 0x2f, | ||
109 | VIA_UDMA_133 | VIA_BAD_AST }, | ||
102 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 110 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
103 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 111 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
104 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, | 112 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, |
105 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, | 113 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, |
114 | { "vt6415", PCI_DEVICE_ID_VIA_6415, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, | ||
106 | { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 115 | { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
107 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 116 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
108 | { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 117 | { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
@@ -122,6 +131,8 @@ static const struct via_isa_bridge { | |||
122 | { "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO }, | 131 | { "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO }, |
123 | { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK }, | 132 | { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK }, |
124 | { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID }, | 133 | { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID }, |
134 | { "vtxxxx", PCI_DEVICE_ID_VIA_ANON, 0x00, 0x2f, | ||
135 | VIA_UDMA_133 | VIA_BAD_AST }, | ||
125 | { NULL } | 136 | { NULL } |
126 | }; | 137 | }; |
127 | 138 | ||
@@ -460,6 +471,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
460 | static int printed_version; | 471 | static int printed_version; |
461 | u8 enable; | 472 | u8 enable; |
462 | u32 timing; | 473 | u32 timing; |
474 | unsigned long flags = id->driver_data; | ||
463 | int rc; | 475 | int rc; |
464 | 476 | ||
465 | if (!printed_version++) | 477 | if (!printed_version++) |
@@ -469,9 +481,13 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
469 | if (rc) | 481 | if (rc) |
470 | return rc; | 482 | return rc; |
471 | 483 | ||
484 | if (flags & VIA_IDFLAG_SINGLE) | ||
485 | ppi[1] = &ata_dummy_port_info; | ||
486 | |||
472 | /* To find out how the IDE will behave and what features we | 487 | /* To find out how the IDE will behave and what features we |
473 | actually have to look at the bridge not the IDE controller */ | 488 | actually have to look at the bridge not the IDE controller */ |
474 | for (config = via_isa_bridges; config->id; config++) | 489 | for (config = via_isa_bridges; config->id != PCI_DEVICE_ID_VIA_ANON; |
490 | config++) | ||
475 | if ((isa = pci_get_device(PCI_VENDOR_ID_VIA + | 491 | if ((isa = pci_get_device(PCI_VENDOR_ID_VIA + |
476 | !!(config->flags & VIA_BAD_ID), | 492 | !!(config->flags & VIA_BAD_ID), |
477 | config->id, NULL))) { | 493 | config->id, NULL))) { |
@@ -482,10 +498,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
482 | pci_dev_put(isa); | 498 | pci_dev_put(isa); |
483 | } | 499 | } |
484 | 500 | ||
485 | if (!config->id) { | ||
486 | printk(KERN_WARNING "via: Unknown VIA SouthBridge, disabling.\n"); | ||
487 | return -ENODEV; | ||
488 | } | ||
489 | pci_dev_put(isa); | 501 | pci_dev_put(isa); |
490 | 502 | ||
491 | if (!(config->flags & VIA_NO_ENABLES)) { | 503 | if (!(config->flags & VIA_NO_ENABLES)) { |
@@ -582,11 +594,13 @@ static int via_reinit_one(struct pci_dev *pdev) | |||
582 | #endif | 594 | #endif |
583 | 595 | ||
584 | static const struct pci_device_id via[] = { | 596 | static const struct pci_device_id via[] = { |
597 | { PCI_VDEVICE(VIA, 0x0415), }, | ||
585 | { PCI_VDEVICE(VIA, 0x0571), }, | 598 | { PCI_VDEVICE(VIA, 0x0571), }, |
586 | { PCI_VDEVICE(VIA, 0x0581), }, | 599 | { PCI_VDEVICE(VIA, 0x0581), }, |
587 | { PCI_VDEVICE(VIA, 0x1571), }, | 600 | { PCI_VDEVICE(VIA, 0x1571), }, |
588 | { PCI_VDEVICE(VIA, 0x3164), }, | 601 | { PCI_VDEVICE(VIA, 0x3164), }, |
589 | { PCI_VDEVICE(VIA, 0x5324), }, | 602 | { PCI_VDEVICE(VIA, 0x5324), }, |
603 | { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE }, | ||
590 | 604 | ||
591 | { }, | 605 | { }, |
592 | }; | 606 | }; |