diff options
author | Søren Schmidt <sos@FreeBSD.org> | 2000-02-22 20:37:01 +0000 |
---|---|---|
committer | Søren Schmidt <sos@FreeBSD.org> | 2000-02-22 20:37:01 +0000 |
commit | 9bd1c89ad3a19ffcf8314af35b14061a55a65b3d (patch) | |
tree | 78f875ac8168f84cec4cdc6dc752a1f5b23ee5d7 | |
parent | 21d31a14fb0b43b4cc2a51a0a272874b80b1c68e (diff) | |
download | src-9bd1c89ad3a19ffcf8314af35b14061a55a65b3d.tar.gz src-9bd1c89ad3a19ffcf8314af35b14061a55a65b3d.zip |
Add UDMA66 support to the Intel ICH chip.
Submitted by: sakichan@lares.dti.ne.jp
Notes
Notes:
svn path=/head/; revision=57391
-rw-r--r-- | sys/dev/ata/ata-dma.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index 5463b055eb07..1dfadcd87e36 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -96,9 +96,35 @@ ata_dmainit(struct ata_softc *scp, int32_t device, switch (scp->chiptype) { + case 0x24118086: /* Intel ICH */ + if (udmamode >= 4) { + int32_t mask48, new48; + int16_t word54; + + word54 = pci_read_config(parent, 0x54, 2); + if (word54 & (0x10 << devno)) { + 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 up UDMA4 mode on ICH chip\n", + (error) ? "failed" : "success"); + if (!error) { + mask48 = (1 << devno) + (3 << (16 + (devno << 2))); + new48 = (1 << devno) + (2 << (16 + (devno << 2))); + pci_write_config(parent, 0x48, + (pci_read_config(parent, 0x48, 4) & + ~mask48) | new48, 4); + pci_write_config(parent, 0x54, word54 | (1 << devno), 2); + scp->mode[ATA_DEV(device)] = ATA_UDMA4; + return; + } + } + } + /* FALLTHROUGH */ + case 0x71118086: /* Intel PIIX4 */ case 0x71998086: /* Intel PIIX4e */ - case 0x24118086: /* Intel ICH */ case 0x24218086: /* Intel ICH0 */ if (udmamode >= 2) { int32_t mask48, new48; |