From patchwork Thu May 23 12:15:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 2606511 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B3932DFB78 for ; Thu, 23 May 2013 12:15:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757969Ab3EWMPx (ORCPT ); Thu, 23 May 2013 08:15:53 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:52248 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756862Ab3EWMPw (ORCPT ); Thu, 23 May 2013 08:15:52 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MN9000HI3EDHS40@mailout4.samsung.com> for linux-samsung-soc@vger.kernel.org; Thu, 23 May 2013 21:15:50 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.49]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 1C.E5.11618.6780E915; Thu, 23 May 2013 21:15:50 +0900 (KST) X-AuditID: cbfee691-b7fef6d000002d62-11-519e08769c0b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 8C.E9.28381.6780E915; Thu, 23 May 2013 21:15:50 +0900 (KST) Received: from DOJAYSLEE01 ([12.23.121.88]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MN900HJV3EEK810@mmp2.samsung.com>; Thu, 23 May 2013 21:15:50 +0900 (KST) From: =?ks_c_5601-1987?B?wMzBpLyu?= To: kgene.kim@samsung.com Cc: linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: fix software reset logic for EXYNOS5440 SOC Date: Thu, 23 May 2013 21:15:50 +0900 Message-id: <003001ce57af$435c0340$ca1409c0$%lee@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=ks_c_5601-1987 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac5Xr0Mder8MQH6gQgGsHtlboATkZA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAIsWRmVeSWpSXmKPExsVy+t8zQ90yjnmBBv1z9Cx6F1xls5hxfh+T A5NH35ZVjB6fN8kFMEVx2aSk5mSWpRbp2yVwZcyd0M1asJuj4tyypYwNjO/Yuhg5OSQETCRa 3j9hgbDFJC7cWw8U5+IQEljGKPHu6jq4oo2vmsCKhASmM0ocuJsNUfSbUWLHjx1MIAk2ASuJ fbsns4PYIgKSEk0Nf5hBbGYBVYl/6yFsYQFPif65O4GGcnCwAMXfTzUGCfMK2EocWPOYBcIW lPgx+R4LRKuBxPtZfawQtrzE5jVvmUFaJQTUJR791YXYpCfx+PotqHIRiX0v3jGCnCYh0M8u 8f/RN7BeFgEBiW+TD7FA9MpKbDrADPGWpMTBFTdYJjCKzUKyeRaSzbOQbJ6FZMUCRpZVjKKp BckFxUnpRaZ6xYm5xaV56XrJ+bmbGCGxM3EH4/0D1ocYk4HWT2SWEk3OB8ZeXkm8obGZkYWp iamxkbmlGWnCSuK86i3WgUIC6YklqdmpqQWpRfFFpTmpxYcYmTg4pRoYzz1nl/mR/vFOQ/el fdwvzDcvW/HQcIIup8iqo5+yPEW04noXzAzUe3Bb4vGk5P26T67KbrUNkH44wXW3xbWtzu/P ZPy9MW3p9Y+HBNjWPHT509nV7hvB8/bg/HiPSWmM1qdu9M+fzrrg8tR1Sqar2guW9d+Xm6ro c3LZDhP27Vyz5ZmPdO+zmq/EUpyRaKjFXFScCACtPHsYswIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLIsWRmVeSWpSXmKPExsVy+t9jQd0yjnmBBuuOa1n0LrjKZjHj/D4m ByaPvi2rGD0+b5ILYIpqYLTJSE1MSS1SSM1Lzk/JzEu3VfIOjneONzUzMNQ1tLQwV1LIS8xN tVVy8QnQdcvMAZqvpFCWmFMKFApILC5W0rfDNCE0xE3XAqYxQtc3JAiux8gADSSsY8yYO6Gb tWA3R8W5ZUsZGxjfsXUxcnJICJhIbHzVxAJhi0lcuLceLC4kMJ1R4sDd7C5GLiD7N6PEjh87 mEASbAJWEvt2T2YHsUUEJCWaGv4wg9jMAqoS/9ZD2MICnhL9c3cCDeLgYAGKv59qDBLmFbCV OLDmMQuELSjxY/I9FohWA4n3s/pYIWx5ic1r3jKDtEoIqEs8+qsLsUlP4vH1W1DlIhL7Xrxj nMAoMAvJpFlIJs1CMmkWkpYFjCyrGEVTC5ILipPScw31ihNzi0vz0vWS83M3MYIj85nUDsaV DRaHGAU4GJV4eCVuzwkUYk0sK67MPcQowcGsJMK7uWduoBBvSmJlVWpRfnxRaU5q8SHGZKA/ JzJLiSbnA5NGXkm8obGJmZGlkZmFkYm5OWnCSuK8B1qtA4UE0hNLUrNTUwtSi2C2MHFwSjUw Vi+Lc2rVmrnE77NSXs6+d4ICsR9rlmce6BP9uPmnQdHzgs9B4T/NPkvfNP5qcWnutlYX6TaV Xas95IQuXnEolhCXzfvHvrt+et+XN1m3tNb+PmI5+0fRFqezEy98ejgxOMtEsnm3Pctq9QUp qhmiXZuj2vvfT5u/4gLvjgXGul/frE0MWXX5hhJLcUaioRZzUXEiAO9tbogQAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch fixes software reset logic. Software reset applies only to powered-on domains in SOC because software reset to all domains causes reboot failure. Signed-off-by: Jungseok Lee --- arch/arm/mach-exynos/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) return; diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 7f431dd..a22615d 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -317,9 +317,13 @@ void exynos5_restart(char mode, const char *cmd) val = 0x1; addr = EXYNOS_SWRESET; } else if (of_machine_is_compatible("samsung,exynos5440")) { + u32 status; np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"); + addr = of_iomap(np, 0) + 0xbc; + status = __raw_readl(addr); addr = of_iomap(np, 0) + 0xcc; - val = (0xfff << 20) | (0x1 << 16); + val = __raw_readl(addr); + val = (val & 0xffff0000) | (status & 0xffff); } else { pr_err("%s: cannot support non-DT\n", __func__);