diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata-dma.c | 21 | ||||
-rw-r--r-- | sys/dev/ata/ata-pci.c | 6 |
2 files changed, 24 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index ea4c6d2..5db7213 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -371,6 +371,22 @@ ata_dmainit(struct ata_softc *scp, int device, /* we could set PIO mode timings, but we assume the BIOS did that */ break; + case 0x74111022: /* AMD 766 */ + 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 AMD chip\n", + (error) ? "failed" : "success"); + if (!error) { + pci_write_config(parent, 0x53 - devno, 0xc6, 1); + scp->mode[ATA_DEV(device)] = ATA_UDMA5; + return; + } + } + /* FALLTHROUGH */ + case 0x74091022: /* AMD 756 */ if (udmamode >= 4) { error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0, @@ -380,7 +396,7 @@ ata_dmainit(struct ata_softc *scp, int device, "%s setting UDMA4 on AMD chip\n", (error) ? "failed" : "success"); if (!error) { - pci_write_config(parent, 0x53 - devno, 0xc3, 1); + pci_write_config(parent, 0x53 - devno, 0xc5, 1); scp->mode[ATA_DEV(device)] = ATA_UDMA4; return; } @@ -467,7 +483,8 @@ via_82c586: if (bootverbose) ata_printf(scp, device, "%s setting UDMA2 on %s chip\n", (error) ? "failed" : "success", - (scp->chiptype == 0x74091022) ? "AMD" : "VIA"); + ((scp->chiptype == 0x74091022) || + (scp->chiptype == 0x74111022)) ? "AMD" : "VIA"); if (!error) { pci_write_config(parent, 0x53 - devno, 0xc0, 1); scp->mode[ATA_DEV(device)] = ATA_UDMA2; diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index 6319e20..1371f76 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -158,6 +158,9 @@ ata_pci_match(device_t dev) case 0x74091022: return "AMD 756 ATA66 controller"; + case 0x74111022: + return "AMD 766 ATA100 controller"; + case 0x02111166: return "ServerWorks ROSB4 ATA33 controller"; @@ -307,7 +310,8 @@ ata_pci_attach(device_t dev) break; case 0x05711106: - case 0x74091022: /* VIA 82C586, 82C596, 82C686 & AMD 756 default setup */ + case 0x74091022: + case 0x74111022: /* VIA 82C586, '596, '686 & AMD 756, '766 default setup */ /* set prefetch, postwrite */ pci_write_config(dev, 0x41, pci_read_config(dev, 0x41, 1) | 0xf0, 1); |