From patchwork Wed Nov 7 10:47:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 1709781 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C866C3FC8F for ; Wed, 7 Nov 2012 10:44:35 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TW35r-0005CH-Ve; Wed, 07 Nov 2012 10:42:48 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TW35k-00059Z-Dx for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2012 10:42:41 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD400DJS5QV83J0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2012 19:42:38 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A1.B9.12699.E1B3A905; Wed, 07 Nov 2012 19:42:38 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-ea-509a3b1e33f1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 81.B9.12699.E1B3A905; Wed, 07 Nov 2012 19:42:38 +0900 (KST) Received: from localhost.localdomain ([107.108.73.92]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD4006SP5N7OJ20@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2012 19:42:38 +0900 (KST) From: Abhilash Kesavan To: linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com Subject: [PATCH 3/3] ARM: EXYNOS5: Fix i2c suspend/resume for legacy controller Date: Wed, 07 Nov 2012 16:17:00 +0530 Message-id: <1352285220-31544-4-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 1.6.6.1 In-reply-to: <1352285220-31544-1-git-send-email-a.kesavan@samsung.com> References: <1352285220-31544-1-git-send-email-a.kesavan@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsWyRsSkVlfOelaAwefXwhabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugStj+YfzbAVbeSvuzjdqYFzN3cXIySEhYCLRfuYmG4QtJnHh3nog m4tDSGApo8SpH51sMEW/+trAbCGB6YwSZ3+lQNjrmSR63gSA2GwCehIL/n1lBrFFBOwlVpw4 CWYLC/hLTFw1nx3EZhFQlVi1bTUriM0r4Crx7vcMqPkKEqc/rAWr4RRwk7g7cwJQLwfQfFeJ 7R84IFoFJL5NPsQCEpYQkJXYdIAZ5EwJgT1sEi9XTGCEGCMpcXDFDZYJjEILGBlWMYqmFiQX FCel5xrpFSfmFpfmpesl5+duYgQG2el/z6R3MK5qsDjEKMDBqMTDa5E6M0CINbGsuDL3EKME B7OSCO9yo1kBQrwpiZVVqUX58UWlOanFhxh9gC6ZyCwlmpwPjIC8knhDYxNzU2NTSyMjM1NT HMJK4rzNHikBQgLpiSWp2ampBalFMOOYODilGhiXr6s9IdYwa9uPD6s0pLsdFd/82dLU9ubO 47wnOQv7U/jnL76w0c2lMPbX1cZjnF9ON3ofaj+yZMVhsyMKfR+3CkjGbjt3K3DaSYfU7iOc 2UXF/98eYo1qnlnBovQznKFEMFRHT9o6L399/tc/Kc9e5r9ZrCuRYFDulSLuwOG+8iLPVuPF fnxKLMUZiYZazEXFiQBo7EpkXwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsVy+t9jQV0561kBBoun8FhsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwhrGjOUfzrMVbOWtuDvfqIFx NXcXIyeHhICJxK++NjYIW0ziwr31YLaQwHRGibO/UiDs9UwSPW8CQGw2AT2JBf++MoPYIgL2 EitOnASzhQX8JSaums8OYrMIqEqs2raaFcTmFXCVePd7BtR8BYnTH9aC1XAKuEncnTkBqJcD aL6rxPYPHBMYeRYwMqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECA7hZ9I7GFc1WBxiFOBg VOLhtUidGSDEmlhWXJl7iFGCg1lJhHe50awAId6UxMqq1KL8+KLSnNTiQ4w+QEdNZJYSTc4H xldeSbyhsYm5qbGppYmFiZklDmElcd5mj5QAIYH0xJLU7NTUgtQimHFMHJxSDYwJZSfvvkzv EOvc/I5P4Kux7I8NjBfTfbdv3HnX6bDK9TT7L6v8lfyWHPzpsvLbtya5C1P2WM3c3tltdish wXHKgaXX18755cgis1qY8xTXzZ0/mxKCnn17nXvtnqjzWxX2qkaWvbvlStb2XGMpMNrIm6Wd ccBwWojcHL0e/19xjUxuzmJLtK4rsRRnJBpqMRcVJwIAVK3up44CAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121107_054240_849029_B8B5ABE7 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 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] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On resuming from suspend the i2c configuration register that is part of system controller resets to 0xf. This sets the interrupt source to the new high speed i2c rather than the legacy one that we are using. Save and restore the I2C_CFG register for exynos5 to fix this. Signed-off-by: Abhilash Kesavan --- arch/arm/mach-exynos/pm.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index fd55cee..43e0b04 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -62,6 +62,10 @@ static struct sleep_save exynos4_vpll_save[] = { SAVE_ITEM(EXYNOS4_VPLL_CON1), }; +static struct sleep_save exynos5_sys_save[] = { + SAVE_ITEM(EXYNOS5_SYS_I2C_CFG), +}; + static struct sleep_save exynos_core_save[] = { /* SROM side */ SAVE_ITEM(S5P_SROM_BW), @@ -104,6 +108,7 @@ static void exynos_pm_prepare(void) s3c_pm_do_save(exynos4_epll_save, ARRAY_SIZE(exynos4_epll_save)); s3c_pm_do_save(exynos4_vpll_save, ARRAY_SIZE(exynos4_vpll_save)); } else { + s3c_pm_do_save(exynos5_sys_save, ARRAY_SIZE(exynos5_sys_save)); /* Disable USE_RETENTION of JPEG_MEM_OPTION */ tmp = __raw_readl(EXYNOS5_JPEG_MEM_OPTION); tmp &= ~EXYNOS5_OPTION_USE_RETENTION; @@ -307,6 +312,10 @@ static void exynos_pm_resume(void) __raw_writel((1 << 28), S5P_PAD_RET_EBIA_OPTION); __raw_writel((1 << 28), S5P_PAD_RET_EBIB_OPTION); + if (soc_is_exynos5250()) + s3c_pm_do_restore(exynos5_sys_save, + ARRAY_SIZE(exynos5_sys_save)); + s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); if (!soc_is_exynos5250()) {