diff options
author | Richard Zhu <r65037@freescale.com> | 2013-10-14 22:44:54 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-10-15 08:47:00 -0400 |
commit | 8b789d89813fae01908ecc825c9dfc0ec90647ad (patch) | |
tree | b14d0e8c5212e85f2d44fc9cde292ec5eb499a3a /drivers/ata/libahci.c | |
parent | 89951f2245e5c31d6b74dea1570db716175a74fe (diff) |
ahci: imx: setup power saving methods
In order to save power consumption as much as possible.
* Disable sata phy internal pll reference clock when sysetem enter
into suspend mode, enable it after resume.
* Setup module parameter used to enable imx ahci test power down
mode(PDDQ) or not, when there is no device detected on the port
* minor modifications:
- The format of the copyright is changed, because that the original
one can't pass fsl internal patch reivew without the character
'(c)'.
- Exports ahci_platform_ops and ahci_error_handler().
NOTE:
* The hot-plug can't be supported when PDDQ mode is ever enabled.
* module parameter usage how-to:
- default: enable PDDQ mode when no device detected.
- add "ahci-imx.hotplug=1" into kernel command line if your don't
want to enable PDDQ mode when no device detected on the port.
tj: Slightly updated description and comments.
Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libahci.c')
-rw-r--r-- | drivers/ata/libahci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index b67086fde1f1..7e2a1b38093e 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
@@ -89,7 +89,6 @@ static int ahci_pmp_retry_softreset(struct ata_link *link, unsigned int *class, | |||
89 | static int ahci_hardreset(struct ata_link *link, unsigned int *class, | 89 | static int ahci_hardreset(struct ata_link *link, unsigned int *class, |
90 | unsigned long deadline); | 90 | unsigned long deadline); |
91 | static void ahci_postreset(struct ata_link *link, unsigned int *class); | 91 | static void ahci_postreset(struct ata_link *link, unsigned int *class); |
92 | static void ahci_error_handler(struct ata_port *ap); | ||
93 | static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); | 92 | static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); |
94 | static void ahci_dev_config(struct ata_device *dev); | 93 | static void ahci_dev_config(struct ata_device *dev); |
95 | #ifdef CONFIG_PM | 94 | #ifdef CONFIG_PM |
@@ -1982,7 +1981,7 @@ static void ahci_thaw(struct ata_port *ap) | |||
1982 | writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); | 1981 | writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); |
1983 | } | 1982 | } |
1984 | 1983 | ||
1985 | static void ahci_error_handler(struct ata_port *ap) | 1984 | void ahci_error_handler(struct ata_port *ap) |
1986 | { | 1985 | { |
1987 | if (!(ap->pflags & ATA_PFLAG_FROZEN)) { | 1986 | if (!(ap->pflags & ATA_PFLAG_FROZEN)) { |
1988 | /* restart engine */ | 1987 | /* restart engine */ |
@@ -1995,6 +1994,7 @@ static void ahci_error_handler(struct ata_port *ap) | |||
1995 | if (!ata_dev_enabled(ap->link.device)) | 1994 | if (!ata_dev_enabled(ap->link.device)) |
1996 | ahci_stop_engine(ap); | 1995 | ahci_stop_engine(ap); |
1997 | } | 1996 | } |
1997 | EXPORT_SYMBOL_GPL(ahci_error_handler); | ||
1998 | 1998 | ||
1999 | static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) | 1999 | static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) |
2000 | { | 2000 | { |