diff options
author | Pavel Machek <pavel@ucw.cz> | 2006-09-17 19:39:06 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 19:39:06 +0200 |
commit | f0645e7720e0baacbde61d7d1f0180309451c695 (patch) | |
tree | 78a0c50f341648770963372162331643888647ba /drivers/ieee1394/ohci1394.c | |
parent | 9531f13ae56b136d0ad09e6e5c8308a7dc58f3f0 (diff) | |
download | blackbird-obmc-linux-f0645e7720e0baacbde61d7d1f0180309451c695.tar.gz blackbird-obmc-linux-f0645e7720e0baacbde61d7d1f0180309451c695.zip |
set power state of firewire host during suspend
Put firewire host controller in PCI Dx state for system suspend.
(I was not able to measure any power savings, but it sounds like right
thing to do, anyway.)
Signed-off-by: Pavel Machek <pavel@suse.cz>
Update by stefanr: Shuffle with existing PPC_PMAC code. Set power
state in the resume hook too.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/ohci1394.c')
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 8d92246bdc3b..54d686aed39f 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -3532,6 +3532,7 @@ static void ohci1394_pci_remove(struct pci_dev *pdev) #ifdef CONFIG_PM static int ohci1394_pci_resume (struct pci_dev *pdev) { +/* PowerMac resume code comes first */ #ifdef CONFIG_PPC_PMAC if (machine_is(powermac)) { struct device_node *of_node; @@ -3543,17 +3544,19 @@ static int ohci1394_pci_resume (struct pci_dev *pdev) } #endif /* CONFIG_PPC_PMAC */ + pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); pci_enable_device(pdev); return 0; } - static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state) { pci_save_state(pdev); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); +/* PowerMac suspend code comes last */ #ifdef CONFIG_PPC_PMAC if (machine_is(powermac)) { struct device_node *of_node; @@ -3563,11 +3566,10 @@ static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state) if (of_node) pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0); } -#endif - +#endif /* CONFIG_PPC_PMAC */ return 0; } -#endif +#endif /* CONFIG_PM */ #define PCI_CLASS_FIREWIRE_OHCI ((PCI_CLASS_SERIAL_FIREWIRE << 8) | 0x10) |