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.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