diff options
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/pmac_feature.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c index 7f1062d222c9..086abc1bcca1 100644 --- a/arch/ppc64/kernel/pmac_feature.c +++ b/arch/ppc64/kernel/pmac_feature.c | |||
@@ -674,3 +674,67 @@ void __init pmac_check_ht_link(void) | |||
674 | dump_HT_speeds("PCI-X HT Downlink", cfg, freq); | 674 | dump_HT_speeds("PCI-X HT Downlink", cfg, freq); |
675 | #endif | 675 | #endif |
676 | } | 676 | } |
677 | |||
678 | /* | ||
679 | * Early video resume hook | ||
680 | */ | ||
681 | |||
682 | static void (*pmac_early_vresume_proc)(void *data) __pmacdata; | ||
683 | static void *pmac_early_vresume_data __pmacdata; | ||
684 | |||
685 | void pmac_set_early_video_resume(void (*proc)(void *data), void *data) | ||
686 | { | ||
687 | if (_machine != _MACH_Pmac) | ||
688 | return; | ||
689 | preempt_disable(); | ||
690 | pmac_early_vresume_proc = proc; | ||
691 | pmac_early_vresume_data = data; | ||
692 | preempt_enable(); | ||
693 | } | ||
694 | EXPORT_SYMBOL(pmac_set_early_video_resume); | ||
695 | |||
696 | |||
697 | /* | ||
698 | * AGP related suspend/resume code | ||
699 | */ | ||
700 | |||
701 | static struct pci_dev *pmac_agp_bridge __pmacdata; | ||
702 | static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata; | ||
703 | static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata; | ||
704 | |||
705 | void __pmac pmac_register_agp_pm(struct pci_dev *bridge, | ||
706 | int (*suspend)(struct pci_dev *bridge), | ||
707 | int (*resume)(struct pci_dev *bridge)) | ||
708 | { | ||
709 | if (suspend || resume) { | ||
710 | pmac_agp_bridge = bridge; | ||
711 | pmac_agp_suspend = suspend; | ||
712 | pmac_agp_resume = resume; | ||
713 | return; | ||
714 | } | ||
715 | if (bridge != pmac_agp_bridge) | ||
716 | return; | ||
717 | pmac_agp_suspend = pmac_agp_resume = NULL; | ||
718 | return; | ||
719 | } | ||
720 | EXPORT_SYMBOL(pmac_register_agp_pm); | ||
721 | |||
722 | void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) | ||
723 | { | ||
724 | if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) | ||
725 | return; | ||
726 | if (pmac_agp_bridge->bus != dev->bus) | ||
727 | return; | ||
728 | pmac_agp_suspend(pmac_agp_bridge); | ||
729 | } | ||
730 | EXPORT_SYMBOL(pmac_suspend_agp_for_card); | ||
731 | |||
732 | void __pmac pmac_resume_agp_for_card(struct pci_dev *dev) | ||
733 | { | ||
734 | if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) | ||
735 | return; | ||
736 | if (pmac_agp_bridge->bus != dev->bus) | ||
737 | return; | ||
738 | pmac_agp_resume(pmac_agp_bridge); | ||
739 | } | ||
740 | EXPORT_SYMBOL(pmac_resume_agp_for_card); | ||