[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1433512155-9906-1-git-send-email-dinguyen@opensource.altera.com>
Date: Fri, 5 Jun 2015 08:49:15 -0500
From: <dinguyen@...nsource.altera.com>
To: <bp@...en8.de>
CC: <dinh.linux@...il.com>, <tthayer@...nsource.altera.com>,
<atull@...nsource.altera.com>, <dougthompson@...ssion.com>,
<mchehab@....samsung.com>, <linux-edac@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Dinh Nguyen <dinguyen@...nsource.altera.com>
Subject: [PATCH] EDAC, altera: wrap edac pm with a CONFIG_PM
From: Alan Tull <atull@...nsource.altera.com>
Suspend-to-RAM and EDAC support are mutually exclusive on
SOCFPGA. If the EDAC is enabled, it will prevent the
platform from going into suspend.
Signed-off-by: Alan Tull <atull@...nsource.altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
Acked-by: Borislav Petkov <bp@...e.de>
---
Hi Boris,
Please apply this patch to your for-next? This was part of Alan Tull's
suspend-to-ram patch that I was going to take through arm-soc. But if
I left the patch as it was, it would have caused a merge conflict for
v4.2.
Thanks,
Dinh
---
drivers/edac/altera_edac.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 182c741..23ef091 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -477,11 +477,31 @@ static int altr_sdram_remove(struct platform_device *pdev)
return 0;
}
+/*
+ * If you want to suspend, need to disable EDAC by removing it
+ * from the device tree or defconfig.
+ */
+#ifdef CONFIG_PM
+static int altr_sdram_prepare(struct device *dev)
+{
+ pr_err("Suspend not allowed when EDAC is enabled.\n");
+
+ return -EPERM;
+}
+
+static const struct dev_pm_ops altr_sdram_pm_ops = {
+ .prepare = altr_sdram_prepare,
+};
+#endif
+
static struct platform_driver altr_sdram_edac_driver = {
.probe = altr_sdram_probe,
.remove = altr_sdram_remove,
.driver = {
.name = "altr_sdram_edac",
+#ifdef CONFIG_PM
+ .pm = &altr_sdram_pm_ops,
+#endif
.of_match_table = altr_sdram_ctrl_of_match,
},
};
--
2.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists