aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_rcar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_rcar.c')
-rw-r--r--drivers/ata/sata_rcar.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index cb0d2e644af5..d49a5193b7de 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -2,8 +2,8 @@
2 * Renesas R-Car SATA driver 2 * Renesas R-Car SATA driver
3 * 3 *
4 * Author: Vladimir Barinov <source@cogentembedded.com> 4 * Author: Vladimir Barinov <source@cogentembedded.com>
5 * Copyright (C) 2013 Cogent Embedded, Inc. 5 * Copyright (C) 2013-2015 Cogent Embedded, Inc.
6 * Copyright (C) 2013 Renesas Solutions Corp. 6 * Copyright (C) 2013-2015 Renesas Solutions Corp.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the 9 * under the terms of the GNU General Public License as published by the
@@ -992,9 +992,30 @@ static int sata_rcar_resume(struct device *dev)
992 return 0; 992 return 0;
993} 993}
994 994
995static int sata_rcar_restore(struct device *dev)
996{
997 struct ata_host *host = dev_get_drvdata(dev);
998 struct sata_rcar_priv *priv = host->private_data;
999
1000 clk_prepare_enable(priv->clk);
1001
1002 sata_rcar_setup_port(host);
1003
1004 /* initialize host controller */
1005 sata_rcar_init_controller(host);
1006
1007 ata_host_resume(host);
1008
1009 return 0;
1010}
1011
995static const struct dev_pm_ops sata_rcar_pm_ops = { 1012static const struct dev_pm_ops sata_rcar_pm_ops = {
996 .suspend = sata_rcar_suspend, 1013 .suspend = sata_rcar_suspend,
997 .resume = sata_rcar_resume, 1014 .resume = sata_rcar_resume,
1015 .freeze = sata_rcar_suspend,
1016 .thaw = sata_rcar_resume,
1017 .poweroff = sata_rcar_suspend,
1018 .restore = sata_rcar_restore,
998}; 1019};
999#endif 1020#endif
1000 1021