Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Tomasz Figa and committed by
Olof Johansson
cd3fc1b9 7e5955db

+13 -5
+13 -5
arch/arm/plat-samsung/pm.c
··· 16 16 #include <linux/suspend.h> 17 17 #include <linux/errno.h> 18 18 #include <linux/delay.h> 19 + #include <linux/of.h> 19 20 #include <linux/serial_core.h> 20 21 #include <linux/io.h> 21 22 ··· 262 261 * require a full power-cycle) 263 262 */ 264 263 265 - if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && 264 + if (!of_have_populated_dt() && 265 + !any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && 266 266 !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) { 267 267 printk(KERN_ERR "%s: No wake-up sources!\n", __func__); 268 268 printk(KERN_ERR "%s: Aborting sleep\n", __func__); ··· 272 270 273 271 /* save all necessary core registers not covered by the drivers */ 274 272 275 - samsung_pm_save_gpios(); 276 - samsung_pm_saved_gpios(); 273 + if (!of_have_populated_dt()) { 274 + samsung_pm_save_gpios(); 275 + samsung_pm_saved_gpios(); 276 + } 277 + 277 278 s3c_pm_save_uarts(); 278 279 s3c_pm_save_core(); 279 280 ··· 315 310 316 311 s3c_pm_restore_core(); 317 312 s3c_pm_restore_uarts(); 318 - samsung_pm_restore_gpios(); 319 - s3c_pm_restored_gpios(); 313 + 314 + if (!of_have_populated_dt()) { 315 + samsung_pm_restore_gpios(); 316 + s3c_pm_restored_gpios(); 317 + } 320 318 321 319 s3c_pm_debug_init(); 322 320