From patchwork Fri May 17 16:24:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2583831 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 4B29CDF215 for ; Fri, 17 May 2013 16:28:16 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdNUM-00005L-8J; Fri, 17 May 2013 16:26:40 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdNTp-0001SZ-5V; Fri, 17 May 2013 16:26:05 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdNTE-0001O0-U7 for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2013 16:25:29 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MMY003AFAXG67C0@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2013 17:25:01 +0100 (BST) X-AuditID: cbfec7f4-b7fd76d0000035e1-06-519659dcddd7 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id C5.95.13793.CD956915; Fri, 17 May 2013 17:25:00 +0100 (BST) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MMY00K5ZAXKIM00@eusync2.samsung.com>; Fri, 17 May 2013 17:25:00 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/6] ARM: SAMSUNG: pm: Adjust for pinctrl- and DT-enabled platforms Date: Fri, 17 May 2013 18:24:29 +0200 Message-id: <1368807872-2601-4-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1368807872-2601-1-git-send-email-t.figa@samsung.com> References: <1368807872-2601-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOLMWRmVeSWpSXmKPExsVy+t/xK7p3IqcFGlzZZmPxd9Ixdouzyw6y Wfx/9JrVonfBVTaLs01v2C2m/FnOZLHp8TVWixnn9zFZnLr+mc3iwoqN7BavDraxWKyf8ZrF 4tiMJYwOvB6/f01i9JjdcJHF4861PWwem5fUe1w50cTq0bdlFaPH9mvzmD0+b5Lz2Dg3NIAz issmJTUnsyy1SN8ugSvj1vfpLAX7eSv+/PnO0sC4mruLkZNDQsBEYvvupywQtpjEhXvr2boY uTiEBJYySly9tZERwuljkpi04AY7SBWbgJrE54ZHbCC2iICqxOe2BewgRcwCO5klLj+4CTZK WCBU4llvKyOIzQJUdLT5DlicV8BRYk7XVjaIdQoSx7dvA6vhFHCSeDNrDjOILQRUc7PrLOsE Rt4FjAyrGEVTS5MLipPScw31ihNzi0vz0vWS83M3MUIC98sOxsXHrA4xCnAwKvHwznSeFijE mlhWXJl7iFGCg1lJhPf4x6mBQrwpiZVVqUX58UWlOanFhxiZODilGhjj41hcpKzvP2qbZ+L5 4vlBhzQWhicztTN6jVg8ribsKa/PTvks+S5O5PSf+PmV6/v3HJHPbeBoETijnmcZyC2+LCL1 i0t6y7KfL/d0WCwuum95OvhnM3fEr74T9ic3yyh/+KtsGPX+7IRi5Wmrpqf2tB65YMl/8849 frm7nVd6WVZr3t7rY6HEUpyRaKjFXFScCADRwhleOgIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130517_122529_098647_5BAD994E X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.13 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, =?UTF-8?q?Heiko=20St=C3=BCbner?= , arnd@arndb.de, Stephen Warren , Linus Walleij , Prathyush K , Doug Anderson , Kyungmin Park , Thomas Abraham , olof@lixom.net, Tomasz Figa , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Signed-off-by: Kyungmin Park Tested-by: Doug Anderson Reviewed-by: Doug Anderson --- arch/arm/plat-samsung/pm.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 53210ec..8ac2b2d 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -261,7 +261,8 @@ static int s3c_pm_enter(suspend_state_t state) * 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)) { printk(KERN_ERR "%s: No wake-up sources!\n", __func__); printk(KERN_ERR "%s: Aborting sleep\n", __func__); @@ -270,8 +271,11 @@ static int s3c_pm_enter(suspend_state_t state) /* save all necessary core registers not covered by the drivers */ - samsung_pm_save_gpios(); - samsung_pm_saved_gpios(); + if (!of_have_populated_dt()) { + samsung_pm_save_gpios(); + samsung_pm_saved_gpios(); + } + s3c_pm_save_uarts(); s3c_pm_save_core(); @@ -310,8 +314,11 @@ static int s3c_pm_enter(suspend_state_t state) s3c_pm_restore_core(); 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();