summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/dev/ata/ata-dma.c21
-rw-r--r--sys/dev/ata/ata-pci.c6
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);
OpenPOWER on IntegriCloud