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/pdc202xx_new.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/pdc202xx_new.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_new.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 73bd264fbf9f..9fc59962553b 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -226,7 +226,7 @@ static void pdcnew_reset(ide_drive_t *drive) | |||
226 | * read_counter - Read the byte count registers | 226 | * read_counter - Read the byte count registers |
227 | * @dma_base: for the port address | 227 | * @dma_base: for the port address |
228 | */ | 228 | */ |
229 | static long __devinit read_counter(u32 dma_base) | 229 | static long read_counter(u32 dma_base) |
230 | { | 230 | { |
231 | u32 pri_dma_base = dma_base, sec_dma_base = dma_base + 0x08; | 231 | u32 pri_dma_base = dma_base, sec_dma_base = dma_base + 0x08; |
232 | u8 cnt0, cnt1, cnt2, cnt3; | 232 | u8 cnt0, cnt1, cnt2, cnt3; |
@@ -266,7 +266,7 @@ static long __devinit read_counter(u32 dma_base) | |||
266 | * @dma_base: for the port address | 266 | * @dma_base: for the port address |
267 | * E.g. 16949000 on 33 MHz PCI bus, i.e. half of the PCI clock. | 267 | * E.g. 16949000 on 33 MHz PCI bus, i.e. half of the PCI clock. |
268 | */ | 268 | */ |
269 | static long __devinit detect_pll_input_clock(unsigned long dma_base) | 269 | static long detect_pll_input_clock(unsigned long dma_base) |
270 | { | 270 | { |
271 | struct timeval start_time, end_time; | 271 | struct timeval start_time, end_time; |
272 | long start_count, end_count; | 272 | long start_count, end_count; |
@@ -309,7 +309,7 @@ static long __devinit detect_pll_input_clock(unsigned long dma_base) | |||
309 | } | 309 | } |
310 | 310 | ||
311 | #ifdef CONFIG_PPC_PMAC | 311 | #ifdef CONFIG_PPC_PMAC |
312 | static void __devinit apple_kiwi_init(struct pci_dev *pdev) | 312 | static void apple_kiwi_init(struct pci_dev *pdev) |
313 | { | 313 | { |
314 | struct device_node *np = pci_device_to_OF_node(pdev); | 314 | struct device_node *np = pci_device_to_OF_node(pdev); |
315 | u8 conf; | 315 | u8 conf; |
@@ -325,7 +325,7 @@ static void __devinit apple_kiwi_init(struct pci_dev *pdev) | |||
325 | } | 325 | } |
326 | #endif /* CONFIG_PPC_PMAC */ | 326 | #endif /* CONFIG_PPC_PMAC */ |
327 | 327 | ||
328 | static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev) | 328 | static unsigned int init_chipset_pdcnew(struct pci_dev *dev) |
329 | { | 329 | { |
330 | const char *name = DRV_NAME; | 330 | const char *name = DRV_NAME; |
331 | unsigned long dma_base = pci_resource_start(dev, 4); | 331 | unsigned long dma_base = pci_resource_start(dev, 4); |
@@ -566,6 +566,8 @@ static struct pci_driver driver = { | |||
566 | .id_table = pdc202new_pci_tbl, | 566 | .id_table = pdc202new_pci_tbl, |
567 | .probe = pdc202new_init_one, | 567 | .probe = pdc202new_init_one, |
568 | .remove = __devexit_p(pdc202new_remove), | 568 | .remove = __devexit_p(pdc202new_remove), |
569 | .suspend = ide_pci_suspend, | ||
570 | .resume = ide_pci_resume, | ||
569 | }; | 571 | }; |
570 | 572 | ||
571 | static int __init pdc202new_ide_init(void) | 573 | static int __init pdc202new_ide_init(void) |