Commit 29db2d0e authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[AGPGART] K8 North bridge bus position is no longer relevant.

We search for it by PCI ID now.
parent 3450cace
...@@ -255,15 +255,11 @@ static int cache_nbs (void) ...@@ -255,15 +255,11 @@ static int cache_nbs (void)
/* cache pci_devs of northbridges. */ /* cache pci_devs of northbridges. */
while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) != NULL) { while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) != NULL) {
if (loop_dev->bus->number == 0 &&
PCI_SLOT(loop_dev->devfn) >= 24 &&
PCI_SLOT(loop_dev->devfn) <= 31) {
hammers[i++] = loop_dev; hammers[i++] = loop_dev;
nr_garts = i; nr_garts = i;
if (i == MAX_HAMMER_GARTS) if (i == MAX_HAMMER_GARTS)
return -1; return -1;
} }
}
return 0; return 0;
} }
#endif #endif
...@@ -333,15 +329,12 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev, ...@@ -333,15 +329,12 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev,
{ {
struct pci_dev *loop_dev = NULL; struct pci_dev *loop_dev = NULL;
while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) != NULL) { while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) != NULL) {
if (loop_dev->bus->number == 0 &&
PCI_SLOT(loop_dev->devfn) == 24) {
/* For UP, we only care about the first GART. */ /* For UP, we only care about the first GART. */
hammers[0] = loop_dev; hammers[0] = loop_dev;
nr_garts = 1; nr_garts = 1;
break; break;
} }
} }
}
#endif #endif
pci_set_drvdata(pdev, bridge); pci_set_drvdata(pdev, bridge);
......
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