summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-dma.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2001-05-14 18:38:22 +0000
committersos <sos@FreeBSD.org>2001-05-14 18:38:22 +0000
commitc03c679bb8c2a8d8f60394a320dfbd8cb6dec2d1 (patch)
tree4b8ab409fbf5f327aefa046c8c2415893db97e4e /sys/dev/ata/ata-dma.c
parentbb0854494ca828a273a86d0398378a18cc414897 (diff)
downloadFreeBSD-src-c03c679bb8c2a8d8f60394a320dfbd8cb6dec2d1.zip
FreeBSD-src-c03c679bb8c2a8d8f60394a320dfbd8cb6dec2d1.tar.gz
Add support for the AMD 766 southbridge incl ATA100 support
Fix ATA66 mode for the AMD756, the timing was way to slow
Diffstat (limited to 'sys/dev/ata/ata-dma.c')
-rw-r--r--sys/dev/ata/ata-dma.c21
1 files changed, 19 insertions, 2 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;
OpenPOWER on IntegriCloud