diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:32 -0400 |
commit | feb22b7f8e62b1b987a3a1dbad95af767a1df832 (patch) | |
tree | 428e5294a077fc629caa3706396e835b164eee7c /drivers/ide/pci/it821x.c | |
parent | 1785192b5310ee25165768f5bb80f13146788e3e (diff) |
ide: add proper PCI PM support (v2)
* Keep pointer to ->init_chipset method also in
struct ide_host and set it in ide_host_alloc_all().
* Add ide_pci_suspend() and ide_pci_resume() helpers
(default ->suspend and ->resume implementations).
* ->init_chipset can no longer be marked __devinit.
* Add proper PCI PM support to IDE PCI host drivers
(rz1000.c and tc86c001.c are skipped for now since
they need to be converted from using ->init_hwif
to use ->init_chipset instead).
v2:
* Cleanup CONFIG_PM #ifdef-s per akpm's suggestion.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/it821x.c')
-rw-r--r-- | drivers/ide/pci/it821x.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 0fdea7e91a7a..46edd083b348 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -586,7 +586,7 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
586 | hwif->mwdma_mask = ATA_MWDMA2; | 586 | hwif->mwdma_mask = ATA_MWDMA2; |
587 | } | 587 | } |
588 | 588 | ||
589 | static void __devinit it8212_disable_raid(struct pci_dev *dev) | 589 | static void it8212_disable_raid(struct pci_dev *dev) |
590 | { | 590 | { |
591 | /* Reset local CPU, and set BIOS not ready */ | 591 | /* Reset local CPU, and set BIOS not ready */ |
592 | pci_write_config_byte(dev, 0x5E, 0x01); | 592 | pci_write_config_byte(dev, 0x5E, 0x01); |
@@ -603,7 +603,7 @@ static void __devinit it8212_disable_raid(struct pci_dev *dev) | |||
603 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x20); | 603 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x20); |
604 | } | 604 | } |
605 | 605 | ||
606 | static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev) | 606 | static unsigned int init_chipset_it821x(struct pci_dev *dev) |
607 | { | 607 | { |
608 | u8 conf; | 608 | u8 conf; |
609 | static char *mode[2] = { "pass through", "smart" }; | 609 | static char *mode[2] = { "pass through", "smart" }; |
@@ -685,6 +685,8 @@ static struct pci_driver driver = { | |||
685 | .id_table = it821x_pci_tbl, | 685 | .id_table = it821x_pci_tbl, |
686 | .probe = it821x_init_one, | 686 | .probe = it821x_init_one, |
687 | .remove = __devexit_p(it821x_remove), | 687 | .remove = __devexit_p(it821x_remove), |
688 | .suspend = ide_pci_suspend, | ||
689 | .resume = ide_pci_resume, | ||
688 | }; | 690 | }; |
689 | 691 | ||
690 | static int __init it821x_ide_init(void) | 692 | static int __init it821x_ide_init(void) |