Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Rework support for i845, i865 and i875P. agp(4) ...



details:   https://anonhg.NetBSD.org/src/rev/54443a8ba1ca
branches:  trunk
changeset: 550977:54443a8ba1ca
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Aug 26 18:43:54 2003 +0000

description:
Rework support for i845, i865 and i875P. agp(4) now doesn't "kill" the
i82547EI on my i865PE motherboard any longer.

diffstat:

 sys/dev/pci/agp_intel.c |  36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diffs (94 lines):

diff -r eccc9d4de3b1 -r 54443a8ba1ca sys/dev/pci/agp_intel.c
--- a/sys/dev/pci/agp_intel.c   Tue Aug 26 18:14:24 2003 +0000
+++ b/sys/dev/pci/agp_intel.c   Tue Aug 26 18:43:54 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp_intel.c,v 1.13 2003/08/26 17:28:13 tron Exp $      */
+/*     $NetBSD: agp_intel.c,v 1.14 2003/08/26 18:43:54 tron Exp $      */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_intel.c,v 1.13 2003/08/26 17:28:13 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_intel.c,v 1.14 2003/08/26 18:43:54 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,6 +63,7 @@
 #define        CHIP_I840       0x2
 #define        CHIP_I845       0x3
 #define        CHIP_I850       0x4
+#define        CHIP_I865       0x5
 };
 
 static u_int32_t agp_intel_get_aperture(struct agp_softc *);
@@ -139,22 +140,24 @@
        }
 
        switch (PCI_PRODUCT(isc->vga_pa.pa_id)) {
-       case PCI_PRODUCT_INTEL_82855PM_AGP:
-       case PCI_PRODUCT_INTEL_82845_AGP:
-       case PCI_PRODUCT_INTEL_82865_AGP:
-       case PCI_PRODUCT_INTEL_82875P_AGP:
-               isc->chiptype = CHIP_I845;
+       case PCI_PRODUCT_INTEL_82443LX_AGP:
+       case PCI_PRODUCT_INTEL_82443BX_AGP:
+       case PCI_PRODUCT_INTEL_82443GX_AGP:
+               isc->chiptype = CHIP_I443;
                break;
        case PCI_PRODUCT_INTEL_82840_AGP:
                isc->chiptype = CHIP_I840;
                break;
+       case PCI_PRODUCT_INTEL_82855PM_AGP:
+       case PCI_PRODUCT_INTEL_82845_AGP:
+               isc->chiptype = CHIP_I845;
+               break;
        case PCI_PRODUCT_INTEL_82850_AGP:
                isc->chiptype = CHIP_I850;
                break;
-       case PCI_PRODUCT_INTEL_82443LX_AGP:
-       case PCI_PRODUCT_INTEL_82443BX_AGP:
-       case PCI_PRODUCT_INTEL_82443GX_AGP:
-               isc->chiptype = CHIP_I443;
+       case PCI_PRODUCT_INTEL_82865_AGP:
+       case PCI_PRODUCT_INTEL_82875P_AGP:
+               isc->chiptype = CHIP_I865;
                break;
        }
 
@@ -203,10 +206,11 @@
        /* Enable things, clear errors etc. */
        switch (isc->chiptype) {
        case CHIP_I845:
+       case CHIP_I865:
                {
-               pci_conf_write(sc->as_pc, sc->as_tag, AGP_INTEL_AGPCMD,
-                       AGPCMD_SBA | AGPCMD_AGPEN | AGPCMD_RATE_4X);
-               pci_conf_write(sc->as_pc, sc->as_tag, AGP_I845_AGPMISC,                                 AGPMISC_AAGN);
+               reg = pci_conf_read(sc->as_pc, sc->as_tag, AGP_I840_MCHCFG);
+               reg |= MCHCFG_AAGN;
+               pci_conf_write(sc->as_pc, sc->as_tag, AGP_I840_MCHCFG, reg);
                break;
                }
        case CHIP_I840:
@@ -238,8 +242,9 @@
                        AGP_INTEL_I8XX_ERRSTS, 0xc000);
                break;
 
+       case CHIP_I845:
        case CHIP_I850:
-       case CHIP_I845:
+       case CHIP_I865:
                pci_conf_write(sc->as_pc, sc->as_tag,
                        AGP_INTEL_I8XX_ERRSTS, 0x00ff);
                break;
@@ -351,6 +356,7 @@
        pcireg_t reg;
 
        switch (isc->chiptype) {
+       case CHIP_I865:
        case CHIP_I850:
        case CHIP_I845:
        case CHIP_I840:



Home | Main Index | Thread Index | Old Index