Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Give each AGP controller its own attribute, and let the ...
details: https://anonhg.NetBSD.org/src/rev/5075ec2c72b1
branches: trunk
changeset: 514967:5075ec2c72b1
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Sep 15 01:32:10 2001 +0000
description:
Give each AGP controller its own attribute, and let the "agpbus"
device (rather, the device that carries that attribute) also
carry one or more attributes indicating which type of controller
it might be.
This will allow systems that might have AGP, but would never have
e.g. an Intel PCI-Host bridge, to trim out code that won't be used.
diffstat:
sys/arch/i386/conf/files.i386 | 5 +++--
sys/dev/pci/agp.c | 21 ++++++++++++++++++++-
sys/dev/pci/files.agp | 27 +++++++++++++++++++--------
3 files changed, 42 insertions(+), 11 deletions(-)
diffs (119 lines):
diff -r 7b0c6c9b5b4f -r 5075ec2c72b1 sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386 Sat Sep 15 01:19:38 2001 +0000
+++ b/sys/arch/i386/conf/files.i386 Sat Sep 15 01:32:10 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.i386,v 1.195 2001/09/15 01:10:10 thorpej Exp $
+# $NetBSD: files.i386,v 1.196 2001/09/15 01:32:11 thorpej Exp $
#
# new style config file for i386 architecture
#
@@ -169,7 +169,8 @@
file arch/i386/pci/pcic_pci_machdep.c pcic_pci
# PCI-Host bridge chipsets
-device pchb: pcibus, agpbus
+device pchb: pcibus, agpbus, agp_ali, agp_amd, agp_i810, agp_intel, agp_sis,
+ agp_via
attach pchb at pci
file arch/i386/pci/pchb.c pchb needs-flag
file arch/i386/pci/pchb_rnd.c pchb & rnd
diff -r 7b0c6c9b5b4f -r 5075ec2c72b1 sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Sat Sep 15 01:19:38 2001 +0000
+++ b/sys/dev/pci/agp.c Sat Sep 15 01:32:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.6 2001/09/15 00:52:15 thorpej Exp $ */
+/* $NetBSD: agp.c,v 1.7 2001/09/15 01:32:10 thorpej Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -106,18 +106,30 @@
static int agp_unbind_user(struct agp_softc *, agp_unbind *);
static int agpdev_match(struct pci_attach_args *);
+#include "agp_ali.h"
+#include "agp_amd.h"
+#include "agp_i810.h"
+#include "agp_intel.h"
+#include "agp_sis.h"
+#include "agp_via.h"
+
const struct agp_product {
uint32_t ap_vendor;
uint32_t ap_product;
int (*ap_match)(const struct pci_attach_args *);
int (*ap_attach)(struct device *, struct device *, void *);
} agp_products[] = {
+#if NAGP_ALI > 0
{ PCI_VENDOR_ALI, -1,
NULL, agp_ali_attach },
+#endif
+#if NAGP_AMD > 0
{ PCI_VENDOR_AMD, -1,
agp_amd_match, agp_amd_attach },
+#endif
+#if NAGP_I810 > 0
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82810_MCH,
NULL, agp_i810_attach },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82810_DC100_MCH,
@@ -126,15 +138,22 @@
NULL, agp_i810_attach },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82815_FULL_HUB,
NULL, agp_i810_attach },
+#endif
+#if NAGP_INTEL > 0
{ PCI_VENDOR_INTEL, -1,
NULL, agp_intel_attach },
+#endif
+#if NAGP_SIS > 0
{ PCI_VENDOR_SIS, -1,
NULL, agp_sis_attach },
+#endif
+#if NAGP_VIA > 0
{ PCI_VENDOR_VIATECH, -1,
NULL, agp_via_attach },
+#endif
{ 0, 0,
NULL, NULL },
diff -r 7b0c6c9b5b4f -r 5075ec2c72b1 sys/dev/pci/files.agp
--- a/sys/dev/pci/files.agp Sat Sep 15 01:19:38 2001 +0000
+++ b/sys/dev/pci/files.agp Sat Sep 15 01:32:10 2001 +0000
@@ -1,14 +1,25 @@
-# $NetBSD: files.agp,v 1.1 2001/09/15 01:10:09 thorpej Exp $
+# $NetBSD: files.agp,v 1.2 2001/09/15 01:32:10 thorpej Exp $
define agpbus { }
device agp
attach agp at agpbus
-file dev/pci/agp.c agp needs-flag
+file dev/pci/agp.c agp needs-flag
+
+define agp_ali
+file dev/pci/agp_ali.c agp_ali & agp needs-flag
+
+define agp_amd
+file dev/pci/agp_amd.c agp_amd & agp needs-flag
-file dev/pci/agp_ali.c agp
-file dev/pci/agp_amd.c agp
-file dev/pci/agp_i810.c agp
-file dev/pci/agp_intel.c agp
-file dev/pci/agp_sis.c agp
-file dev/pci/agp_via.c agp
+define agp_i810
+file dev/pci/agp_i810.c agp_i810 & agp needs-flag
+
+define agp_intel
+file dev/pci/agp_intel.c agp_intel & agp needs-flag
+
+define agp_sis
+file dev/pci/agp_sis.c agp_sis & agp needs-flag
+
+define agp_via
+file dev/pci/agp_via.c agp_via & agp needs-flag
Home |
Main Index |
Thread Index |
Old Index