aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
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 /include/linux/ide.h
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 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 432eb98f7fe7..2c5d83ddaef6 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -17,6 +17,7 @@
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/completion.h> 19#include <linux/completion.h>
20#include <linux/pm.h>
20#ifdef CONFIG_BLK_DEV_IDEACPI 21#ifdef CONFIG_BLK_DEV_IDEACPI
21#include <acpi/acpi.h> 22#include <acpi/acpi.h>
22#endif 23#endif
@@ -639,6 +640,7 @@ struct ide_host {
639 ide_hwif_t *ports[MAX_HWIFS]; 640 ide_hwif_t *ports[MAX_HWIFS];
640 unsigned int n_ports; 641 unsigned int n_ports;
641 struct device *dev[2]; 642 struct device *dev[2];
643 unsigned int (*init_chipset)(struct pci_dev *);
642 unsigned long host_flags; 644 unsigned long host_flags;
643 void *host_priv; 645 void *host_priv;
644}; 646};
@@ -1264,6 +1266,14 @@ int ide_pci_init_two(struct pci_dev *, struct pci_dev *,
1264 const struct ide_port_info *, void *); 1266 const struct ide_port_info *, void *);
1265void ide_pci_remove(struct pci_dev *); 1267void ide_pci_remove(struct pci_dev *);
1266 1268
1269#ifdef CONFIG_PM
1270int ide_pci_suspend(struct pci_dev *, pm_message_t);
1271int ide_pci_resume(struct pci_dev *);
1272#else
1273#define ide_pci_suspend NULL
1274#define ide_pci_resume NULL
1275#endif
1276
1267void ide_map_sg(ide_drive_t *, struct request *); 1277void ide_map_sg(ide_drive_t *, struct request *);
1268void ide_init_sg_cmd(ide_drive_t *, struct request *); 1278void ide_init_sg_cmd(ide_drive_t *, struct request *);
1269 1279