From patchwork Thu Sep 18 15:27:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 4932311 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54FC1BEEA5 for ; Thu, 18 Sep 2014 15:36:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04D352010C for ; Thu, 18 Sep 2014 15:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D88720109 for ; Thu, 18 Sep 2014 15:36:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932387AbaIRP3F (ORCPT ); Thu, 18 Sep 2014 11:29:05 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:47353 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932372AbaIRP27 (ORCPT ); Thu, 18 Sep 2014 11:28:59 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NC300HV6SCA8230@mailout3.samsung.com>; Fri, 19 Sep 2014 00:28:58 +0900 (KST) X-AuditID: cbfee61b-f79f86d00000144c-b4-541afa3adcb5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B5.02.05196.A3AFA145; Fri, 19 Sep 2014 00:28:58 +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 <0NC300HEYSAHGBF0@mmp1.samsung.com>; Fri, 19 Sep 2014 00:28:58 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Zhang Rui , Amit Daniel Kachhap , Naveen Krishna Chatradhi , Lukasz Majewski , Kyungmin Park , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 10/33] thermal: exynos: replace tmu_irqstatus check by Exynos5440 one Date: Thu, 18 Sep 2014 17:27:27 +0200 Message-id: <1411054070-25757-11-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1411054070-25757-1-git-send-email-b.zolnierkie@samsung.com> References: <1411054070-25757-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jAV2rX1IhBg8+y1o0XA2x2DhjPavF 3eeHGS3mX7nGanG26Q27xZuHmxktLu+aw2bxufcIo8WM8/uYLJ487GNz4PLYOesuu8fiPS+Z PPq2rGL0+LxJLoAlissmJTUnsyy1SN8ugSujcYFbwVaxisunvjA2ME4W7mLk5JAQMJFYtHMb K4QtJnHh3nq2LkYuDiGBRYwSnecvM4IkhAS6mCTaemtBbDYBK4mJ7avA4iICWhInLm1nAmlg FrjFJPH6xmSwhLBAuMTFW9uAJnFwsAioSvzbag0S5hXwlJi+vo8RYpmiRPezCWwgNidQvOHW JnaIXR4SbVvuMk9g5F3AyLCKUTS1ILmgOCk910ivODG3uDQvXS85P3cTIzjInknvYFzVYHGI UYCDUYmH9wCvVIgQa2JZcWXuIUYJDmYlEd4/H4FCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeQ+2 WgcKCaQnlqRmp6YWpBbBZJk4OKUaGDXXLF+TohHNcHnGpqDk2wH6IakHF4sYPL0g/vhxyOOP ja1Xr/AeWjpHcu1iAUv9ZUkTytQrVed/st/e1yayWEL51Ra5wL4/OckXb/g3GHha56ilXRSM sVm7bWlI25GmnutB/fXW11R9ksVMPv0XzS+N8s9Zs/ZMhbhZw2rf2zvrSnyEf6x8q8RSnJFo qMVcVJwIAN7kuLcuAgAA Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, 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 reg->tmu_irqstatus is set to non-zero value only for Exynos5440 so replace check for non-zero value of reg->tmu_irqstatus by explicitly checking for Exynos5440 SoC type. Then remove no longer needed reg->tmu_irqstatus register abstraction. There should be no functional changes caused by this patch. Cc: Naveen Krishna Chatradhi Cc: Amit Daniel Kachhap Cc: Lukasz Majewski Cc: Eduardo Valentin Cc: Zhang Rui Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park --- drivers/thermal/samsung/exynos_tmu.c | 4 ++-- drivers/thermal/samsung/exynos_tmu.h | 2 -- drivers/thermal/samsung/exynos_tmu_data.c | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index a4ed576..85e74e1 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -399,8 +399,8 @@ static void exynos_tmu_work(struct work_struct *work) if (!IS_ERR(data->clk_sec)) clk_enable(data->clk_sec); /* Find which sensor generated this interrupt */ - if (reg->tmu_irqstatus) { - val_type = readl(data->base_second + reg->tmu_irqstatus); + if (data->soc == SOC_ARCH_EXYNOS5440) { + val_type = readl(data->base_second + EXYNOS5440_TMU_IRQ_STATUS); if (!((val_type >> data->id) & 0x1)) goto out; } diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 6567293..5ab7482 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -96,7 +96,6 @@ enum soc_type { * @intclr_rise_mask: mask bits of all rising interrupt bits. * @intclr_fall_mask: mask bits of all rising interrupt bits. * @emul_con: TMU emulation controller register. - * @tmu_irqstatus: register to find which TMU generated interrupts. * @tmu_pmin: register to get/set the Pmin value. */ struct exynos_tmu_registers { @@ -126,7 +125,6 @@ struct exynos_tmu_registers { u32 emul_con; - u32 tmu_irqstatus; u32 tmu_pmin; }; diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index b9a3778..5811b99 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c @@ -422,7 +422,6 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = { .intclr_rise_shift = EXYNOS5440_TMU_RISE_INT_SHIFT, .intclr_rise_mask = EXYNOS5440_TMU_RISE_INT_MASK, .intclr_fall_mask = EXYNOS5440_TMU_FALL_INT_MASK, - .tmu_irqstatus = EXYNOS5440_TMU_IRQ_STATUS, .emul_con = EXYNOS5440_TMU_S0_7_DEBUG, .tmu_pmin = EXYNOS5440_TMU_PMIN, };