Commit d304c543 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[AGPGART] Add support for VIA K8T400M GART.

parent 7d40047a
...@@ -260,9 +260,11 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev, ...@@ -260,9 +260,11 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev,
if (!bridge) if (!bridge)
return -ENOMEM; return -ENOMEM;
/* Assume here we have an 8151. (Later this assumption will be fixed). */ if (pdev->vendor == PCI_VENDOR_ID_AMD &&
pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id); pdev->device == PCI_DEVICE_ID_AMD_8151_0) {
switch (rev_id) {
pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
switch (rev_id) {
case 0x01: revstring="A0"; case 0x01: revstring="A0";
break; break;
case 0x02: revstring="A1"; case 0x02: revstring="A1";
...@@ -275,15 +277,16 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev, ...@@ -275,15 +277,16 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev,
break; break;
default: revstring="??"; default: revstring="??";
break; break;
} }
printk ("Detected AMD 8151 AGP Bridge rev %s", revstring); printk ("Detected AMD 8151 AGP Bridge rev %s", revstring);
/* /*
* Work around errata. * Work around errata.
* Chips before B2 stepping incorrectly reporting v3.5 * Chips before B2 stepping incorrectly reporting v3.5
*/ */
if (rev_id < 0x13) { if (rev_id < 0x13) {
bridge->major_version = 3; bridge->major_version = 3;
bridge->minor_version = 0; bridge->minor_version = 0;
}
} }
bridge->driver = &amd_8151_driver; bridge->driver = &amd_8151_driver;
...@@ -330,6 +333,14 @@ static struct pci_device_id agp_amdk8_pci_table[] __initdata = { ...@@ -330,6 +333,14 @@ static struct pci_device_id agp_amdk8_pci_table[] __initdata = {
.subvendor = PCI_ANY_ID, .subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
}, },
{
.class = (PCI_CLASS_BRIDGE_HOST << 8),
.class_mask = ~0,
.vendor = PCI_VENDOR_ID_VIA,
.device = PCI_DEVICE_ID_VIA_K8T400M_0,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
{ } { }
}; };
......
...@@ -1128,6 +1128,7 @@ ...@@ -1128,6 +1128,7 @@
#define PCI_DEVICE_ID_VIA_8754 0x3168 #define PCI_DEVICE_ID_VIA_8754 0x3168
#define PCI_DEVICE_ID_VIA_8235 0x3177 #define PCI_DEVICE_ID_VIA_8235 0x3177
#define PCI_DEVICE_ID_VIA_P4N333 0x3178 #define PCI_DEVICE_ID_VIA_P4N333 0x3178
#define PCI_DEVICE_ID_VIA_K8T400M_0 0x3188
#define PCI_DEVICE_ID_VIA_8377_0 0x3189 #define PCI_DEVICE_ID_VIA_8377_0 0x3189
#define PCI_DEVICE_ID_VIA_KM400 0x3205 #define PCI_DEVICE_ID_VIA_KM400 0x3205
#define PCI_DEVICE_ID_VIA_P4M400 0x3209 #define PCI_DEVICE_ID_VIA_P4M400 0x3209
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment