From patchwork Tue Sep 24 08:08:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 2932081 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D17399F289 for ; Tue, 24 Sep 2013 08:10:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDE2220365 for ; Tue, 24 Sep 2013 08:10:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23F6C2024F for ; Tue, 24 Sep 2013 08:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065Ab3IXIIx (ORCPT ); Tue, 24 Sep 2013 04:08:53 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44908 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804Ab3IXIIv (ORCPT ); Tue, 24 Sep 2013 04:08:51 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MTM00K55EM2OZ60@mailout4.samsung.com>; Tue, 24 Sep 2013 17:08:49 +0900 (KST) X-AuditID: cbfee61a-b7f7a6d00000235f-39-52414891beb6 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id FB.91.09055.19841425; Tue, 24 Sep 2013 17:08:49 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MTM00AMYEM05Z20@mmp1.samsung.com>; Tue, 24 Sep 2013 17:08:49 +0900 (KST) From: Lukasz Majewski To: Zhang Rui , Eduardo Valentin , Amit Daniel Kachhap Cc: "Rafael J. Wysocki" , Linux PM list , Jonghwa Lee , Lukasz Majewski , Lukasz Majewski , linux-kernel , Bartlomiej Zolnierkiewicz , Tomasz Figa , Myungjoo Ham , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/6] thermal: exynos: Provide initial setting for TMU's test MUX address at Exynos4412 Date: Tue, 24 Sep 2013 10:08:19 +0200 Message-id: <1380010102-25817-4-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1380010102-25817-1-git-send-email-l.majewski@samsung.com> References: <1380010102-25817-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNLMWRmVeSWpSXmKPExsVy+t9jAd2JHo5BBltOGVs0XA2x2DhjPavF /CPnWC3W7P/JZNF59gmzxZtH3BZvHm5mtLi8aw6bxefeI4wWM87vY7K43biCzaJ/YS+TxZOH fWwW62e8ZnHg81i85yWTx7ppb5k9+rasYvR4tLiF0eP4je1MHp83yQWwRXHZpKTmZJalFunb JXBlNN+ew1gwlb9i7p8zLA2M33i6GDk5JARMJNbvmcsCYYtJXLi3nq2LkYtDSGARo0T75E52 CKeLSaL52AxGkCo2AT2Jz3efMoEkRASaGCV+HPnGDJJgFjjGLPFllQiILSyQIXFj3xOwOIuA qsSbhdPBbF4BN4n/h1axQ6yTl3h6v48NxOYUcJdofzoFbIEQUM3bR1tZJjDyLmBkWMUomlqQ XFCclJ5rqFecmFtcmpeul5yfu4kRHKTPpHYwrmywOMQowMGoxMO7w9shSIg1say4MvcQowQH s5II7w1bxyAh3pTEyqrUovz4otKc1OJDjNIcLErivAdarQOFBNITS1KzU1MLUotgskwcnFIN jKL+xVOmGejfConxU3+VcaD426b/k66/Ct2fxd9wuX7NpPw1Rw0SngUsqhE/GqjTtejQ7l4H lod1hXk8CTv1mBWbz3/X69ThyP/jXpPc67LAprv0c27jtJlfDBqmLzDYKbVdusJXbcu6LRcq joTqrTP6eVbfYKFVm0zPJYk5yneSZzHKnfexUmIpzkg01GIuKk4EACEv3cZOAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, 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 The commit d0a0ce3e77c795258d47f9163e92d5031d0c5221 ("thermal: exynos: Add missing definations and code cleanup") has removed setting of test MUX address value at TMU configuration setting. This field is not present on Exynos4210 and Exynos5 SoCs. However on Exynos4412 SoC it is required to set this field after reset because without it TMU shows maximal available temperature, which causes immediate platform shutdown. Signed-off-by: Lukasz Majewski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Tomasz Figa --- drivers/thermal/samsung/exynos_tmu.c | 3 +++ drivers/thermal/samsung/exynos_tmu_data.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index a858cc4..21b89e4 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -317,6 +317,9 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) con = readl(data->base + reg->tmu_ctrl); + if (pdata->type == SOC_ARCH_EXYNOS4412) + con |= (EXYNOS4412_MUX_ADDR_VALUE << EXYNOS4412_MUX_ADDR_SHIFT); + if (pdata->reference_voltage) { con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift); con |= pdata->reference_voltage << reg->buf_vref_sel_shift; diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/thermal/samsung/exynos_tmu_data.h index b130b1e..a1ea19d 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.h +++ b/drivers/thermal/samsung/exynos_tmu_data.h @@ -95,6 +95,10 @@ #define EXYNOS_MAX_TRIGGER_PER_REG 4 +/* Exynos4412 specific */ +#define EXYNOS4412_MUX_ADDR_VALUE 6 +#define EXYNOS4412_MUX_ADDR_SHIFT 20 + /*exynos5440 specific registers*/ #define EXYNOS5440_TMU_S0_7_TRIM 0x000 #define EXYNOS5440_TMU_S0_7_CTRL 0x020