summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch
diff options
context:
space:
mode:
authorYuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>2017-05-22 00:15:23 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-05-25 13:47:13 +0000
commita14e289caaae4c342c2bc686bd5d327ed612b0fc (patch)
tree87cc82526cadd31c77f72a208421e44ee97e7a3a /meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch
parent5b5a54b60f45e67d647cf6cc0fe2b879b2bb8229 (diff)
Add kernel Hibernation code for porter board.
This patch set is a support to Hibernation for a porter board. I've commit with Hibernation Off patch, because it depends strongly on user land. If you can use Hibernation, Please add local.conf agl-porter-hibernate. OVERRIDES .= ":agl-porter-hibernate" DISTRO_FEATURES_append = " agl-porter-hibernate" Change-Id: Ic64c9494a4bbd2518ef1aa334325b96eb7a9479e Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9451 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch')
-rwxr-xr-xmeta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch
new file mode 100755
index 000000000..fd0dfb66f
--- /dev/null
+++ b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch
@@ -0,0 +1,56 @@
+From 5d87144a96085d74b6002bd6d8c093c37bf128b7 Mon Sep 17 00:00:00 2001
+From: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>
+Date: Thu, 18 May 2017 17:04:33 +0900
+Subject: [PATCH 03/15] Add sata hibernation code
+
+Signed-off-by: Yuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>
+---
+ drivers/ata/sata_rcar.c | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
+index 92abfdd..4c82b5e 100644
+--- a/drivers/ata/sata_rcar.c
++++ b/drivers/ata/sata_rcar.c
+@@ -1003,9 +1003,38 @@ static int sata_rcar_resume(struct device *dev)
+ return 0;
+ }
+
++static int sata_rcar_restore(struct device *dev)
++{
++ struct ata_host *host = dev_get_drvdata(dev);
++ struct sata_rcar_priv *priv = host->private_data;
++ int ret;
++
++ clk_prepare_enable(priv->clk);
++
++ ret = sata_rcar_setup_port(host);
++ if (ret)
++ goto cleanup;
++
++ /* initialize host controller */
++ sata_rcar_init_controller(host);
++
++ ata_host_resume(host);
++
++ return 0;
++
++cleanup:
++ clk_disable_unprepare(priv->clk);
++
++ return ret;
++}
++
+ static const struct dev_pm_ops sata_rcar_pm_ops = {
+ .suspend = sata_rcar_suspend,
+ .resume = sata_rcar_resume,
++ .freeze = sata_rcar_suspend,
++ .restore = sata_rcar_restore,
++ .thaw = sata_rcar_resume,
++ .poweroff = sata_rcar_suspend
+ };
+ #endif
+
+--
+1.8.3.1
+