Commit cd3fc1b9 authored by Tomasz Figa's avatar Tomasz Figa Committed by Olof Johansson

ARM: SAMSUNG: pm: Adjust for pinctrl- and DT-enabled platforms

This patch makes legacy code on suspend/resume path being executed
conditionally, on non-DT platforms only, to fix suspend/resume of
DT-enabled systems, for which the code is inappropriate.
Signed-off-by: default avatarTomasz Figa <t.figa@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
[olof: add #include <linux/of.h>]
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 7e5955db
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/of.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/io.h> #include <linux/io.h>
...@@ -261,7 +262,8 @@ static int s3c_pm_enter(suspend_state_t state) ...@@ -261,7 +262,8 @@ static int s3c_pm_enter(suspend_state_t state)
* require a full power-cycle) * require a full power-cycle)
*/ */
if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && if (!of_have_populated_dt() &&
!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) &&
!any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) { !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) {
printk(KERN_ERR "%s: No wake-up sources!\n", __func__); printk(KERN_ERR "%s: No wake-up sources!\n", __func__);
printk(KERN_ERR "%s: Aborting sleep\n", __func__); printk(KERN_ERR "%s: Aborting sleep\n", __func__);
...@@ -270,8 +272,11 @@ static int s3c_pm_enter(suspend_state_t state) ...@@ -270,8 +272,11 @@ static int s3c_pm_enter(suspend_state_t state)
/* save all necessary core registers not covered by the drivers */ /* save all necessary core registers not covered by the drivers */
samsung_pm_save_gpios(); if (!of_have_populated_dt()) {
samsung_pm_saved_gpios(); samsung_pm_save_gpios();
samsung_pm_saved_gpios();
}
s3c_pm_save_uarts(); s3c_pm_save_uarts();
s3c_pm_save_core(); s3c_pm_save_core();
...@@ -310,8 +315,11 @@ static int s3c_pm_enter(suspend_state_t state) ...@@ -310,8 +315,11 @@ static int s3c_pm_enter(suspend_state_t state)
s3c_pm_restore_core(); s3c_pm_restore_core();
s3c_pm_restore_uarts(); s3c_pm_restore_uarts();
samsung_pm_restore_gpios();
s3c_pm_restored_gpios(); if (!of_have_populated_dt()) {
samsung_pm_restore_gpios();
s3c_pm_restored_gpios();
}
s3c_pm_debug_init(); s3c_pm_debug_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment