agp_via.c (133406) | agp_via.c (133852) |
---|---|
1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/agp/agp_via.c 133406 2004-08-09 21:01:49Z anholt $"); | 28__FBSDID("$FreeBSD: head/sys/dev/agp/agp_via.c 133852 2004-08-16 12:25:48Z obrien $"); |
29 30#include "opt_bus.h" | 29 30#include "opt_bus.h" |
31#include "opt_agp.h" |
|
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> 35#include <sys/kernel.h> 36#include <sys/module.h> 37#include <sys/bus.h> 38#include <sys/lock.h> --- 44 unchanged lines hidden (view full) --- 83 return ("VIA 82C597 (Apollo VP3) host to PCI bridge"); 84 case 0x05981106: 85 return ("VIA 82C598 (Apollo MVP3) host to PCI bridge"); 86 case 0x06051106: 87 return ("VIA 82C694X (Apollo Pro 133A) host to PCI bridge"); 88 case 0x06911106: 89 return ("VIA 82C691 (Apollo Pro) host to PCI bridge"); 90 case 0x31881106: | 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/malloc.h> 36#include <sys/kernel.h> 37#include <sys/module.h> 38#include <sys/bus.h> 39#include <sys/lock.h> --- 44 unchanged lines hidden (view full) --- 84 return ("VIA 82C597 (Apollo VP3) host to PCI bridge"); 85 case 0x05981106: 86 return ("VIA 82C598 (Apollo MVP3) host to PCI bridge"); 87 case 0x06051106: 88 return ("VIA 82C694X (Apollo Pro 133A) host to PCI bridge"); 89 case 0x06911106: 90 return ("VIA 82C691 (Apollo Pro) host to PCI bridge"); 91 case 0x31881106: |
92#if defined(__amd64__) || defined(AGP_AMD64_GART) 93 return NULL; 94#else |
|
91 return ("VIA 8385 host to PCI bridge"); | 95 return ("VIA 8385 host to PCI bridge"); |
96#endif |
|
92 case 0x31891106: 93 return ("VIA 8377 (Apollo KT400/KT400A/KT600) host to PCI bridge"); 94 }; 95 96 if (pci_get_vendor(dev) == 0x1106) 97 return ("VIA Generic host to PCI bridge"); 98 99 return NULL; --- 20 unchanged lines hidden (view full) --- 120agp_via_attach(device_t dev) 121{ 122 struct agp_via_softc *sc = device_get_softc(dev); 123 struct agp_gatt *gatt; 124 int error; 125 u_int32_t agpsel; 126 127 switch (pci_get_devid(dev)) { | 97 case 0x31891106: 98 return ("VIA 8377 (Apollo KT400/KT400A/KT600) host to PCI bridge"); 99 }; 100 101 if (pci_get_vendor(dev) == 0x1106) 102 return ("VIA Generic host to PCI bridge"); 103 104 return NULL; --- 20 unchanged lines hidden (view full) --- 125agp_via_attach(device_t dev) 126{ 127 struct agp_via_softc *sc = device_get_softc(dev); 128 struct agp_gatt *gatt; 129 int error; 130 u_int32_t agpsel; 131 132 switch (pci_get_devid(dev)) { |
133#ifdef AGP_NO_AMD64_GART |
|
128 case 0x31881106: | 134 case 0x31881106: |
135#endif |
|
129 case 0x31891106: 130 /* The newer VIA chipsets will select the AGP version based on 131 * what AGP versions the card supports. We still have to 132 * program it using the v2 registers if it has chosen to use 133 * compatibility mode. 134 */ 135 agpsel = pci_read_config(dev, AGP_VIA_AGPSEL, 1); 136 if ((agpsel & (1 << 1)) == 0) --- 166 unchanged lines hidden --- | 136 case 0x31891106: 137 /* The newer VIA chipsets will select the AGP version based on 138 * what AGP versions the card supports. We still have to 139 * program it using the v2 registers if it has chosen to use 140 * compatibility mode. 141 */ 142 agpsel = pci_read_config(dev, AGP_VIA_AGPSEL, 1); 143 if ((agpsel & (1 << 1)) == 0) --- 166 unchanged lines hidden --- |