aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:32 -0400
commitfeb22b7f8e62b1b987a3a1dbad95af767a1df832 (patch)
tree428e5294a077fc629caa3706396e835b164eee7c /drivers/ide/pci/hpt366.c
parent1785192b5310ee25165768f5bb80f13146788e3e (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/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index ab6c217f104e..a194022b6a61 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -943,7 +943,7 @@ static void hpt3xxn_rw_disk(ide_drive_t *drive, struct request *rq)
943 * Perform a calibration cycle on the DPLL. 943 * Perform a calibration cycle on the DPLL.
944 * Returns 1 if this succeeds 944 * Returns 1 if this succeeds
945 */ 945 */
946static int __devinit hpt37x_calibrate_dpll(struct pci_dev *dev, u16 f_low, u16 f_high) 946static int hpt37x_calibrate_dpll(struct pci_dev *dev, u16 f_low, u16 f_high)
947{ 947{
948 u32 dpll = (f_high << 16) | f_low | 0x100; 948 u32 dpll = (f_high << 16) | f_low | 0x100;
949 u8 scr2; 949 u8 scr2;
@@ -971,7 +971,7 @@ static int __devinit hpt37x_calibrate_dpll(struct pci_dev *dev, u16 f_low, u16 f
971 return 1; 971 return 1;
972} 972}
973 973
974static void __devinit hpt3xx_disable_fast_irq(struct pci_dev *dev, u8 mcr_addr) 974static void hpt3xx_disable_fast_irq(struct pci_dev *dev, u8 mcr_addr)
975{ 975{
976 struct ide_host *host = pci_get_drvdata(dev); 976 struct ide_host *host = pci_get_drvdata(dev);
977 struct hpt_info *info = host->host_priv + (&dev->dev == host->dev[1]); 977 struct hpt_info *info = host->host_priv + (&dev->dev == host->dev[1]);
@@ -1001,7 +1001,7 @@ static void __devinit hpt3xx_disable_fast_irq(struct pci_dev *dev, u8 mcr_addr)
1001 pci_write_config_byte(dev, mcr_addr + 1, new_mcr); 1001 pci_write_config_byte(dev, mcr_addr + 1, new_mcr);
1002} 1002}
1003 1003
1004static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) 1004static unsigned int init_chipset_hpt366(struct pci_dev *dev)
1005{ 1005{
1006 unsigned long io_base = pci_resource_start(dev, 4); 1006 unsigned long io_base = pci_resource_start(dev, 4);
1007 struct hpt_info *info = hpt3xx_get_info(&dev->dev); 1007 struct hpt_info *info = hpt3xx_get_info(&dev->dev);
@@ -1627,6 +1627,8 @@ static struct pci_driver driver = {
1627 .id_table = hpt366_pci_tbl, 1627 .id_table = hpt366_pci_tbl,
1628 .probe = hpt366_init_one, 1628 .probe = hpt366_init_one,
1629 .remove = __devexit_p(hpt366_remove), 1629 .remove = __devexit_p(hpt366_remove),
1630 .suspend = ide_pci_suspend,
1631 .resume = ide_pci_resume,
1630}; 1632};
1631 1633
1632static int __init hpt366_ide_init(void) 1634static int __init hpt366_ide_init(void)