diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-05-17 12:24:29 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-11 04:10:12 -0400 |
commit | cd3fc1b9a34e535a8acbead7461475fbc43bdd49 (patch) | |
tree | 1b59b008d6fdb1b6ed5327b94fad7d207f2a5f9e | |
parent | 7e5955db458b2d349a8180242afebc78a13ed023 (diff) |
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: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[olof: add #include <linux/of.h>]
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/plat-samsung/pm.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 53210ec4e8ec..bd7124c87fea 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/suspend.h> | 16 | #include <linux/suspend.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/of.h> | ||
19 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
20 | #include <linux/io.h> | 21 | #include <linux/io.h> |
21 | 22 | ||
@@ -261,7 +262,8 @@ static int s3c_pm_enter(suspend_state_t state) | |||
261 | * require a full power-cycle) | 262 | * require a full power-cycle) |
262 | */ | 263 | */ |
263 | 264 | ||
264 | if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && | 265 | if (!of_have_populated_dt() && |
266 | !any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && | ||
265 | !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) { | 267 | !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) { |
266 | printk(KERN_ERR "%s: No wake-up sources!\n", __func__); | 268 | printk(KERN_ERR "%s: No wake-up sources!\n", __func__); |
267 | printk(KERN_ERR "%s: Aborting sleep\n", __func__); | 269 | printk(KERN_ERR "%s: Aborting sleep\n", __func__); |
@@ -270,8 +272,11 @@ static int s3c_pm_enter(suspend_state_t state) | |||
270 | 272 | ||
271 | /* save all necessary core registers not covered by the drivers */ | 273 | /* save all necessary core registers not covered by the drivers */ |
272 | 274 | ||
273 | samsung_pm_save_gpios(); | 275 | if (!of_have_populated_dt()) { |
274 | samsung_pm_saved_gpios(); | 276 | samsung_pm_save_gpios(); |
277 | samsung_pm_saved_gpios(); | ||
278 | } | ||
279 | |||
275 | s3c_pm_save_uarts(); | 280 | s3c_pm_save_uarts(); |
276 | s3c_pm_save_core(); | 281 | s3c_pm_save_core(); |
277 | 282 | ||
@@ -310,8 +315,11 @@ static int s3c_pm_enter(suspend_state_t state) | |||
310 | 315 | ||
311 | s3c_pm_restore_core(); | 316 | s3c_pm_restore_core(); |
312 | s3c_pm_restore_uarts(); | 317 | s3c_pm_restore_uarts(); |
313 | samsung_pm_restore_gpios(); | 318 | |
314 | s3c_pm_restored_gpios(); | 319 | if (!of_have_populated_dt()) { |
320 | samsung_pm_restore_gpios(); | ||
321 | s3c_pm_restored_gpios(); | ||
322 | } | ||
315 | 323 | ||
316 | s3c_pm_debug_init(); | 324 | s3c_pm_debug_init(); |
317 | 325 | ||