From patchwork Tue Feb 24 04:56:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 5869881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 44C6D9F36A for ; Tue, 24 Feb 2015 04:59:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 707AB20645 for ; Tue, 24 Feb 2015 04:59:49 +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 7C5BF20644 for ; Tue, 24 Feb 2015 04:59:48 +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 1YQ7Yz-0005c8-SU; Tue, 24 Feb 2015 04:57:41 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQ7Yk-0005Up-AH for linux-arm-kernel@lists.infradead.org; Tue, 24 Feb 2015 04:57:28 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NK9003QVF312Q60@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 24 Feb 2015 13:57:02 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 1C.F9.18484.D940CE45; Tue, 24 Feb 2015 13:57:01 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-0a-54ec049d850c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 3D.6F.09430.D940CE45; Tue, 24 Feb 2015 13:57:01 +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 <0NK900FYLF31P180@mmp2.samsung.com>; Tue, 24 Feb 2015 13:57:01 +0900 (KST) From: Chanwoo Choi To: rui.zhang@intel.com, edubezval@gmail.com Subject: [PATCH 1/2] thermal: exynos: Fix wrong control of power down detection mode for Exynos7 Date: Tue, 24 Feb 2015 13:56:54 +0900 Message-id: <1424753815-15113-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.5.5 In-reply-to: <1424753815-15113-1-git-send-email-cw00.choi@samsung.com> References: <1424753815-15113-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42JZI2JSqDuX5U2Iwd/zZhaP1yxmsmi4GmKx ccZ6VovrX56zWsy/co3VYtL9CSwW/Y9fM1ucbXrDbvHm4WZGi02PgRKXd81hs/jce4TRYsb5 fUwWTx72sTnweeycdZfdY/Gel0wem1Z1snlsXlLv0bdlFaPH501yAWxRXDYpqTmZZalF+nYJ XBmrtq5hLPjPVfHt9n/WBsZZnF2MHBwSAiYSt/bndzFyApliEhfurWfrYuTiEBJYyiixq/8Q E0TCRGL2/L+MEInpjBLT7p1jgnCamCRmnu5kB6liE9CS2P/iBhuILSKgI3H4yVNmkCJmgWtM Ekc/nAIbJSyQJNGwcxYjiM0ioCpxftY0sGZeAVeJ92s7GSHWKUgsWz6TFcTmFHCT6L91BWyo EFDNpqMXwDZLCFxil/hy4yUbxCABiW+TD7FA/CMrsekAM8QcSYmDK26wTGAUXsDIsIpRNLUg uaA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QWwfQxcXBKNTAWummYLNyt 4vL6T2N2dGDjkhmd80WEl0bw2D27meaXo3V2HZPTrNfrQooPLj1kWfri8m6J5Z1LBDqbo05+ +VNWl3w+cUGo3RLpn9kB8+/31DDusWxKu3Vtzr3X80QL3h+cYPJp65I/ISbna38nnNZub4p/ /fFh/ar+tQJrjbqtXbXkG4/eevRfiaU4I9FQi7moOBEAWlWHIuACAAA= 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-20150223_205726_577273_9D17AEA6 X-CRM114-Status: UNSURE ( 8.69 ) 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, kyungmin.park@samsung.com, linux-kernel@vger.kernel.org, inki.dae@samsung.com, Chanwoo Choi , amit.daniel@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 Tested-by: Abhilash Kesavan --- 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 933cd80..a60f527 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);