aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_mpc52xx.c
diff options
context:
space:
mode:
authorDomen Puncer <domen.puncer@telargo.com>2007-07-03 04:27:38 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-10 21:14:20 -0400
commit35142ddbf7d81ff3f1d9521611e734b8d5014df2 (patch)
tree2cad95f5a9d3896d9ead31ffe5407bc7a9185912 /drivers/ata/pata_mpc52xx.c
parenta77720ad0a4049e4bc6355e4febf899966a48222 (diff)
pata_mpc52xx: suspend/resume support
Implement suspend and resume routines for mpc52xx ata driver. Tested on Lite5200b with deep-sleep and low-power (not yet in-tree) modes. Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_mpc52xx.c')
-rw-r--r--drivers/ata/pata_mpc52xx.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 368fac7d168b..182e83c9047b 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -467,13 +467,27 @@ mpc52xx_ata_remove(struct of_device *op)
467static int 467static int
468mpc52xx_ata_suspend(struct of_device *op, pm_message_t state) 468mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
469{ 469{
470 return 0; /* FIXME : What to do here ? */ 470 struct ata_host *host = dev_get_drvdata(&op->dev);
471
472 return ata_host_suspend(host, state);
471} 473}
472 474
473static int 475static int
474mpc52xx_ata_resume(struct of_device *op) 476mpc52xx_ata_resume(struct of_device *op)
475{ 477{
476 return 0; /* FIXME : What to do here ? */ 478 struct ata_host *host = dev_get_drvdata(&op->dev);
479 struct mpc52xx_ata_priv *priv = host->private_data;
480 int rv;
481
482 rv = mpc52xx_ata_hw_init(priv);
483 if (rv) {
484 printk(KERN_ERR DRV_NAME ": Error during HW init\n");
485 return rv;
486 }
487
488 ata_host_resume(host);
489
490 return 0;
477} 491}
478 492
479#endif 493#endif