aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/amd64-agp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 11:52:18 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 11:52:18 -0500
commitb05005772f34497eb2b7415a651fe785cbe70e16 (patch)
treeb176aeb7fa9baf69e77ddd83e844727490bfcf28 /drivers/char/agp/amd64-agp.c
parent044f324f6ea5d55391db62fca6a295b2651cb946 (diff)
parent7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff)
Merge branch 'origin'
Conflicts: Documentation/video4linux/CARDLIST.cx88 drivers/media/video/cx88/Kconfig drivers/media/video/em28xx/em28xx-video.c drivers/media/video/saa7134/saa7134-dvb.c Resolved as in the original merge by Mauro Carvalho Chehab
Diffstat (limited to 'drivers/char/agp/amd64-agp.c')
-rw-r--r--drivers/char/agp/amd64-agp.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 810679dcbbb0..1251b2515bbe 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -516,8 +516,10 @@ static int __devinit nforce3_agp_init(struct pci_dev *pdev)
516 pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &apbase); 516 pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &apbase);
517 517
518 /* if x86-64 aperture base is beyond 4G, exit here */ 518 /* if x86-64 aperture base is beyond 4G, exit here */
519 if ( (apbase & 0x7fff) >> (32 - 25) ) 519 if ( (apbase & 0x7fff) >> (32 - 25) ) {
520 return -ENODEV; 520 printk(KERN_INFO PFX "aperture base > 4G\n");
521 return -ENODEV;
522 }
521 523
522 apbase = (apbase & 0x7fff) << 25; 524 apbase = (apbase & 0x7fff) << 25;
523 525
@@ -600,6 +602,26 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev)
600 agp_put_bridge(bridge); 602 agp_put_bridge(bridge);
601} 603}
602 604
605#ifdef CONFIG_PM
606
607static int agp_amd64_suspend(struct pci_dev *pdev, pm_message_t state)
608{
609 pci_save_state(pdev);
610 pci_set_power_state(pdev, pci_choose_state(pdev, state));
611
612 return 0;
613}
614
615static int agp_amd64_resume(struct pci_dev *pdev)
616{
617 pci_set_power_state(pdev, PCI_D0);
618 pci_restore_state(pdev);
619
620 return amd_8151_configure();
621}
622
623#endif /* CONFIG_PM */
624
603static struct pci_device_id agp_amd64_pci_table[] = { 625static struct pci_device_id agp_amd64_pci_table[] = {
604 { 626 {
605 .class = (PCI_CLASS_BRIDGE_HOST << 8), 627 .class = (PCI_CLASS_BRIDGE_HOST << 8),
@@ -718,6 +740,10 @@ static struct pci_driver agp_amd64_pci_driver = {
718 .id_table = agp_amd64_pci_table, 740 .id_table = agp_amd64_pci_table,
719 .probe = agp_amd64_probe, 741 .probe = agp_amd64_probe,
720 .remove = agp_amd64_remove, 742 .remove = agp_amd64_remove,
743#ifdef CONFIG_PM
744 .suspend = agp_amd64_suspend,
745 .resume = agp_amd64_resume,
746#endif
721}; 747};
722 748
723 749