Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/pci Pull up revisions 1.102-1.103 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/28e929c31945
branches:  netbsd-1-5
changeset: 490645:28e929c31945
user:      he <he%NetBSD.org@localhost>
date:      Sun Feb 04 18:52:41 2001 +0000

description:
Pull up revisions 1.102-1.103 (requested by bouyer):
  Add support for Ultra/100 on Intel ICH2.

diffstat:

 sys/dev/pci/pciide.c |  33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)

diffs (71 lines):

diff -r 64f876300bcb -r 28e929c31945 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Sun Feb 04 18:52:23 2001 +0000
+++ b/sys/dev/pci/pciide.c      Sun Feb 04 18:52:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.68.2.17 2001/02/04 18:44:41 he Exp $      */
+/*     $NetBSD: pciide.c,v 1.68.2.18 2001/02/04 18:52:41 he Exp $      */
 
 
 /*
@@ -1343,8 +1343,10 @@
        sc->sc_wdcdev.DMA_cap = 2;
        switch(sc->sc_pp->ide_product) {
        case PCI_PRODUCT_INTEL_82801AA_IDE:
+               sc->sc_wdcdev.UDMA_cap = 4;
+               break;
        case PCI_PRODUCT_INTEL_82801BA_IDE:
-               sc->sc_wdcdev.UDMA_cap = 4;
+               sc->sc_wdcdev.UDMA_cap = 5;
                break;
        default:
                sc->sc_wdcdev.UDMA_cap = 2;
@@ -1369,7 +1371,8 @@
                            DEBUG_PROBE);
                }
                if (sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AA_IDE ||
-                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AB_IDE) {
+                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AB_IDE ||
+                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801BA_IDE) {
                        WDCDEBUG_PRINT((", IDE_CONTROL 0x%x",
                            pci_conf_read(sc->sc_pc, sc->sc_tag, PIIX_CONFIG)),
                            DEBUG_PROBE);
@@ -1419,7 +1422,8 @@
                            DEBUG_PROBE);
                }
                if (sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AA_IDE ||
-                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AB_IDE) {
+                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AB_IDE ||
+                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801BA_IDE) {
                        WDCDEBUG_PRINT((", IDE_CONTROL 0x%x",
                            pci_conf_read(sc->sc_pc, sc->sc_tag, PIIX_CONFIG)),
                            DEBUG_PROBE);
@@ -1578,9 +1582,28 @@
                        goto pio;
 
                if (sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AA_IDE ||
-                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AB_IDE) {
+                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AB_IDE ||
+                   sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801BA_IDE) {
                        ideconf |= PIIX_CONFIG_PINGPONG;
                }
+               if (sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801BA_IDE) {
+                       /* setup Ultra/100 */
+                       if (drvp->UDMA_mode > 2 &&
+                           (ideconf & PIIX_CONFIG_CR(channel, drive)) == 0)
+                               drvp->UDMA_mode = 2;
+                       if (drvp->UDMA_mode > 4) {
+                               ideconf |= PIIX_CONFIG_UDMA100(channel, drive);
+                       } else {
+                               ideconf &= ~PIIX_CONFIG_UDMA100(channel, drive);
+                               if (drvp->UDMA_mode > 2) {
+                                       ideconf |= PIIX_CONFIG_UDMA66(channel,
+                                           drive);
+                               } else {
+                                       ideconf &= ~PIIX_CONFIG_UDMA66(channel,
+                                           drive);
+                               }
+                       }
+               }
                if (sc->sc_pp->ide_product == PCI_PRODUCT_INTEL_82801AA_IDE) {
                        /* setup Ultra/66 */
                        if (drvp->UDMA_mode > 2 &&



Home | Main Index | Thread Index | Old Index