aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/amd64-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/amd64-agp.c')
-rw-r--r--drivers/char/agp/amd64-agp.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 7345f9a9b791..7495c522d8e4 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -294,12 +294,13 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
294 * so let double check that order, and lets trust the AMD NB settings 294 * so let double check that order, and lets trust the AMD NB settings
295 */ 295 */
296 if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) { 296 if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) {
297 printk(KERN_INFO "Aperture size %u MB is not right, using settings from NB\n", 297 dev_info(&agp->dev, "aperture size %u MB is not right, using settings from NB\n",
298 32 << order); 298 32 << order);
299 order = nb_order; 299 order = nb_order;
300 } 300 }
301 301
302 printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); 302 dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n",
303 aper, 32 << order);
303 if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) 304 if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order))
304 return -1; 305 return -1;
305 306
@@ -320,10 +321,10 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
320 for (i = 0; i < num_k8_northbridges; i++) { 321 for (i = 0; i < num_k8_northbridges; i++) {
321 struct pci_dev *dev = k8_northbridges[i]; 322 struct pci_dev *dev = k8_northbridges[i];
322 if (fix_northbridge(dev, pdev, cap_ptr) < 0) { 323 if (fix_northbridge(dev, pdev, cap_ptr) < 0) {
323 printk(KERN_ERR PFX "No usable aperture found.\n"); 324 dev_err(&dev->dev, "no usable aperture found\n");
324#ifdef __x86_64__ 325#ifdef __x86_64__
325 /* should port this to i386 */ 326 /* should port this to i386 */
326 printk(KERN_ERR PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n"); 327 dev_err(&dev->dev, "consider rebooting with iommu=memaper=2 to get a good aperture\n");
327#endif 328#endif
328 return -1; 329 return -1;
329 } 330 }
@@ -346,14 +347,14 @@ static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data
346 default: revstring="??"; break; 347 default: revstring="??"; break;
347 } 348 }
348 349
349 printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring); 350 dev_info(&pdev->dev, "AMD 8151 AGP Bridge rev %s\n", revstring);
350 351
351 /* 352 /*
352 * Work around errata. 353 * Work around errata.
353 * Chips before B2 stepping incorrectly reporting v3.5 354 * Chips before B2 stepping incorrectly reporting v3.5
354 */ 355 */
355 if (pdev->revision < 0x13) { 356 if (pdev->revision < 0x13) {
356 printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n"); 357 dev_info(&pdev->dev, "correcting AGP revision (reports 3.5, is really 3.0)\n");
357 bridge->major_version = 3; 358 bridge->major_version = 3;
358 bridge->minor_version = 0; 359 bridge->minor_version = 0;
359 } 360 }
@@ -376,11 +377,11 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
376 struct pci_dev *dev1; 377 struct pci_dev *dev1;
377 int i; 378 int i;
378 unsigned size = amd64_fetch_size(); 379 unsigned size = amd64_fetch_size();
379 printk(KERN_INFO "Setting up ULi AGP.\n"); 380
381 dev_info(&pdev->dev, "setting up ULi AGP\n");
380 dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0)); 382 dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0));
381 if (dev1 == NULL) { 383 if (dev1 == NULL) {
382 printk(KERN_INFO PFX "Detected a ULi chipset, " 384 dev_info(&pdev->dev, "can't find ULi secondary device\n");
383 "but could not fine the secondary device.\n");
384 return -ENODEV; 385 return -ENODEV;
385 } 386 }
386 387
@@ -389,7 +390,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
389 break; 390 break;
390 391
391 if (i == ARRAY_SIZE(uli_sizes)) { 392 if (i == ARRAY_SIZE(uli_sizes)) {
392 printk(KERN_INFO PFX "No ULi size found for %d\n", size); 393 dev_info(&pdev->dev, "no ULi size found for %d\n", size);
393 return -ENODEV; 394 return -ENODEV;
394 } 395 }
395 396
@@ -434,13 +435,11 @@ static int nforce3_agp_init(struct pci_dev *pdev)
434 int i; 435 int i;
435 unsigned size = amd64_fetch_size(); 436 unsigned size = amd64_fetch_size();
436 437
437 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n"); 438 dev_info(&pdev->dev, "setting up Nforce3 AGP\n");
438 439
439 dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0)); 440 dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0));
440 if (dev1 == NULL) { 441 if (dev1 == NULL) {
441 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA " 442 dev_info(&pdev->dev, "can't find Nforce3 secondary device\n");
442 "nForce3 chipset, but could not find "
443 "the secondary device.\n");
444 return -ENODEV; 443 return -ENODEV;
445 } 444 }
446 445
@@ -449,7 +448,7 @@ static int nforce3_agp_init(struct pci_dev *pdev)
449 break; 448 break;
450 449
451 if (i == ARRAY_SIZE(nforce3_sizes)) { 450 if (i == ARRAY_SIZE(nforce3_sizes)) {
452 printk(KERN_INFO PFX "No NForce3 size found for %d\n", size); 451 dev_info(&pdev->dev, "no NForce3 size found for %d\n", size);
453 return -ENODEV; 452 return -ENODEV;
454 } 453 }
455 454
@@ -463,7 +462,7 @@ static int nforce3_agp_init(struct pci_dev *pdev)
463 462
464 /* if x86-64 aperture base is beyond 4G, exit here */ 463 /* if x86-64 aperture base is beyond 4G, exit here */
465 if ( (apbase & 0x7fff) >> (32 - 25) ) { 464 if ( (apbase & 0x7fff) >> (32 - 25) ) {
466 printk(KERN_INFO PFX "aperture base > 4G\n"); 465 dev_info(&pdev->dev, "aperture base > 4G\n");
467 return -ENODEV; 466 return -ENODEV;
468 } 467 }
469 468
@@ -506,7 +505,8 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
506 pdev->device == PCI_DEVICE_ID_AMD_8151_0) { 505 pdev->device == PCI_DEVICE_ID_AMD_8151_0) {
507 amd8151_init(pdev, bridge); 506 amd8151_init(pdev, bridge);
508 } else { 507 } else {
509 printk(KERN_INFO PFX "Detected AGP bridge %x\n", pdev->devfn); 508 dev_info(&pdev->dev, "AGP bridge [%04x/%04x]\n",
509 pdev->vendor, pdev->device);
510 } 510 }
511 511
512 bridge->driver = &amd_8151_driver; 512 bridge->driver = &amd_8151_driver;