Skip to content

Commit

Permalink
pata_mpc52xx: suspend/resume support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Domen Puncer authored and Jeff Garzik committed Jul 11, 2007
1 parent a77720a commit 35142dd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions drivers/ata/pata_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,27 @@ mpc52xx_ata_remove(struct of_device *op)
static int
mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
{
return 0; /* FIXME : What to do here ? */
struct ata_host *host = dev_get_drvdata(&op->dev);

return ata_host_suspend(host, state);
}

static int
mpc52xx_ata_resume(struct of_device *op)
{
return 0; /* FIXME : What to do here ? */
struct ata_host *host = dev_get_drvdata(&op->dev);
struct mpc52xx_ata_priv *priv = host->private_data;
int rv;

rv = mpc52xx_ata_hw_init(priv);
if (rv) {
printk(KERN_ERR DRV_NAME ": Error during HW init\n");
return rv;
}

ata_host_resume(host);

return 0;
}

#endif
Expand Down

0 comments on commit 35142dd

Please sign in to comment.