From patchwork Mon Feb 16 14:20:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 5833291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE365BF6C3 for ; Mon, 16 Feb 2015 14:23:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3EBF201F5 for ; Mon, 16 Feb 2015 14:23:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1F14201B9 for ; Mon, 16 Feb 2015 14:22:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNMXq-0004ap-2A; Mon, 16 Feb 2015 14:21:06 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNMXS-0004Mb-DR for linux-arm-kernel@lists.infradead.org; Mon, 16 Feb 2015 14:20:43 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJV00LM1BTUC050@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 16 Feb 2015 23:20:18 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.112]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 42.4B.17016.2ACF1E45; Mon, 16 Feb 2015 23:20:18 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-d3-54e1fca220e3 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 73.16.09430.2ACF1E45; Mon, 16 Feb 2015 23:20:18 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NJV00GH2BTU1D20@mmp2.samsung.com>; Mon, 16 Feb 2015 23:20:18 +0900 (KST) From: Chanwoo Choi To: rui.zhang@intel.com, edubezval@gmail.com Subject: [PATCH 2/3] thermal: exynos: Fix wrong control of power down detection mode for Exynos7 Date: Mon, 16 Feb 2015 23:20:13 +0900 Message-id: <1424096414-4327-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.5.5 In-reply-to: <1424096414-4327-1-git-send-email-cw00.choi@samsung.com> References: <1424096414-4327-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42JZI2JSoLvoz8MQg+9b9C0er1nMZNFwNcRi 44z1rBbXvzxntZh/5RqrxaT7E1gs+h+/ZrY42/SG3eLNw82MFpseAyUu75rDZvG59wijxYzz +5gsnjzsY3Pg89g56y67x+I9L5k8Nq3qZPPYvKTeo2/LKkaPz5vkAtiiuGxSUnMyy1KL9O0S uDK6f7xhLvjPVbFoy2rWBsZZnF2MnBwSAiYSW7/OZ4OwxSQu3FsPZHNxCAksZZR4va6DBabo xdQprBCJ6YwSe1pOM0E4TUwSxy9fZQepYhPQktj/4gbYKBEBHYnDT54ygxQxC1xjkrh/5ARQ goNDWCBJ4v2HGJAaFgFVice3ljCB2LwCLhKXe6dBnaEgsWz5TFYQm1PAVeLtzp9gNUJANfu+ PAKbKSFwiV2i9+NuJohBAhLfJh9iAZkvISArsekAM8QcSYmDK26wTGAUXsDIsIpRNLUgua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Si2D6mDg4pRoY/VMYz7Uw a4Z02sWVhd/stZjLIabR+GjZFe9oTvGm06dvOu1MSopkvrpiA++xY/8kj1xf7JJ7gVl0kUil 9vs4s/zSOXHRYrPqZxguP7h8rcPsWVszPjMx9vTfnJKeJLeIqV0p9oJ93k6d+w3vNmWeuuuy 4Z1TJremYNrSk5tKbZiOa38QvGOsxFKckWioxVxUnAgA7Irn4d8CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150216_062042_675874_350DD259 X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.0 (-----) Cc: l.majewski@samsung.com, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, linux-pm@vger.kernel.org, amit.daniel@samsung.com, linux-kernel@vger.kernel.org, inki.dae@samsung.com, Chanwoo Choi , kyungmin.park@samsung.com, kgene@kernel.org, a.kesavan@samsung.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the wrong control of PD_DET_EN (power down detection mode) for Exynos7 because exynos7_tmu_control() always enables the power down detection mode regardless 'on' parameter. Cc: Zhang Rui Cc: Eduardo Valentin Signed-off-by: Chanwoo Choi --- drivers/thermal/samsung/exynos_tmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index b8846f1..b199fff 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -682,6 +682,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) if (on) { con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); + con |= (1 << EXYNOS7_PD_DET_EN_SHIFT); interrupt_en = (of_thermal_is_trip_valid(tz, 7) << EXYNOS7_TMU_INTEN_RISE7_SHIFT) | @@ -704,9 +705,9 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; } else { con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); + con &= ~(1 << EXYNOS7_PD_DET_EN_SHIFT); interrupt_en = 0; /* Disable all interrupts */ } - con |= 1 << EXYNOS7_PD_DET_EN_SHIFT; writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); writel(con, data->base + EXYNOS_TMU_REG_CONTROL);