mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
1785192b53
commit
feb22b7f8e
30 changed files with 130 additions and 31 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/pm.h>
|
||||
#ifdef CONFIG_BLK_DEV_IDEACPI
|
||||
#include <acpi/acpi.h>
|
||||
#endif
|
||||
|
@ -639,6 +640,7 @@ struct ide_host {
|
|||
ide_hwif_t *ports[MAX_HWIFS];
|
||||
unsigned int n_ports;
|
||||
struct device *dev[2];
|
||||
unsigned int (*init_chipset)(struct pci_dev *);
|
||||
unsigned long host_flags;
|
||||
void *host_priv;
|
||||
};
|
||||
|
@ -1264,6 +1266,14 @@ int ide_pci_init_two(struct pci_dev *, struct pci_dev *,
|
|||
const struct ide_port_info *, void *);
|
||||
void ide_pci_remove(struct pci_dev *);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
int ide_pci_suspend(struct pci_dev *, pm_message_t);
|
||||
int ide_pci_resume(struct pci_dev *);
|
||||
#else
|
||||
#define ide_pci_suspend NULL
|
||||
#define ide_pci_resume NULL
|
||||
#endif
|
||||
|
||||
void ide_map_sg(ide_drive_t *, struct request *);
|
||||
void ide_init_sg_cmd(ide_drive_t *, struct request *);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue