aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/platforms/pmac_feature.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/ppc/platforms/pmac_feature.c b/arch/ppc/platforms/pmac_feature.c
index eda9c80746a4..24b42fd9e014 100644
--- a/arch/ppc/platforms/pmac_feature.c
+++ b/arch/ppc/platforms/pmac_feature.c
@@ -2944,3 +2944,48 @@ void __pmac pmac_call_early_video_resume(void)
2944 if (pmac_early_vresume_proc) 2944 if (pmac_early_vresume_proc)
2945 pmac_early_vresume_proc(pmac_early_vresume_data); 2945 pmac_early_vresume_proc(pmac_early_vresume_data);
2946} 2946}
2947
2948/*
2949 * AGP related suspend/resume code
2950 */
2951
2952static struct pci_dev *pmac_agp_bridge __pmacdata;
2953static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata;
2954static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata;
2955
2956void __pmac pmac_register_agp_pm(struct pci_dev *bridge,
2957 int (*suspend)(struct pci_dev *bridge),
2958 int (*resume)(struct pci_dev *bridge))
2959{
2960 if (suspend || resume) {
2961 pmac_agp_bridge = bridge;
2962 pmac_agp_suspend = suspend;
2963 pmac_agp_resume = resume;
2964 return;
2965 }
2966 if (bridge != pmac_agp_bridge)
2967 return;
2968 pmac_agp_suspend = pmac_agp_resume = NULL;
2969 return;
2970}
2971EXPORT_SYMBOL(pmac_register_agp_pm);
2972
2973void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev)
2974{
2975 if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL)
2976 return;
2977 if (pmac_agp_bridge->bus != dev->bus)
2978 return;
2979 pmac_agp_suspend(pmac_agp_bridge);
2980}
2981EXPORT_SYMBOL(pmac_suspend_agp_for_card);
2982
2983void __pmac pmac_resume_agp_for_card(struct pci_dev *dev)
2984{
2985 if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL)
2986 return;
2987 if (pmac_agp_bridge->bus != dev->bus)
2988 return;
2989 pmac_agp_resume(pmac_agp_bridge);
2990}
2991EXPORT_SYMBOL(pmac_resume_agp_for_card);