Add first cut support for the ATA100 capable VIA82c686b.
This commit is contained in:
parent
c0f67a683a
commit
af152621e5
@ -276,6 +276,8 @@ ata_pci_match(device_t dev)
|
||||
return "VIA 82C596 ATA66 controller";
|
||||
if (ata_find_dev(dev, 0x05961106, 0))
|
||||
return "VIA 82C596 ATA33 controller";
|
||||
if (ata_find_dev(dev, 0x06861106, 0x40))
|
||||
return "VIA 82C686 ATA100 controller";
|
||||
if (ata_find_dev(dev, 0x06861106, 0))
|
||||
return "VIA 82C686 ATA66 controller";
|
||||
return "VIA Apollo ATA controller";
|
||||
@ -450,6 +452,7 @@ ata_pci_attach(device_t dev)
|
||||
|
||||
case 0x05711106:
|
||||
case 0x74091022: /* VIA 82C586, 82C596, 82C686 & AMD 756 default setup */
|
||||
|
||||
/* set prefetch, postwrite */
|
||||
pci_write_config(dev, 0x41, pci_read_config(dev, 0x41, 1) | 0xf0, 1);
|
||||
|
||||
|
@ -353,9 +353,49 @@ ata_dmainit(struct ata_softc *scp, int device,
|
||||
goto via_82c586;
|
||||
|
||||
case 0x05711106: /* VIA 82C571, 82C586, 82C596, 82C686 */
|
||||
if (ata_find_dev(parent, 0x06861106, 0) || /* 82C686a */
|
||||
ata_find_dev(parent, 0x05961106, 0x12)) { /* 82C596b */
|
||||
|
||||
if (ata_find_dev(parent, 0x06861106, 0x40)) { /* 82C686b */
|
||||
if (udmamode >= 5) {
|
||||
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
||||
ATA_UDMA5, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
||||
if (bootverbose)
|
||||
ata_printf(scp, device,
|
||||
"%s setting UDMA5 on VIA chip\n",
|
||||
(error) ? "failed" : "success");
|
||||
if (!error) {
|
||||
pci_write_config(parent, 0x53 - devno, 0xf0, 1);
|
||||
scp->mode[ATA_DEV(device)] = ATA_UDMA5;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (udmamode >= 4) {
|
||||
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
||||
ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
||||
if (bootverbose)
|
||||
ata_printf(scp, device,
|
||||
"%s setting UDMA4 on VIA chip\n",
|
||||
(error) ? "failed" : "success");
|
||||
if (!error) {
|
||||
pci_write_config(parent, 0x53 - devno, 0xf1, 1);
|
||||
scp->mode[ATA_DEV(device)] = ATA_UDMA4;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (udmamode >= 2) {
|
||||
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
||||
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
||||
if (bootverbose)
|
||||
ata_printf(scp, device,
|
||||
"%s setting UDMA2 on VIA chip\n",
|
||||
(error) ? "failed" : "success");
|
||||
if (!error) {
|
||||
pci_write_config(parent, 0x53 - devno, 0xf4, 1);
|
||||
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ata_find_dev(parent, 0x05961106, 0) || /* 82C596a */
|
||||
ata_find_dev(parent, 0x05861106, 0x02)) { /* 82C586b */
|
||||
if (udmamode >= 4) {
|
||||
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
||||
ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
||||
|
Loading…
Reference in New Issue
Block a user