From patchwork Thu Sep 18 15:27:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 4932391 Return-Path: X-Original-To: patchwork-linux-pm@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 42ECD9F350 for ; Thu, 18 Sep 2014 15:36:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D66C32010B for ; Thu, 18 Sep 2014 15:36:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EDAA02010C for ; Thu, 18 Sep 2014 15:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932317AbaIRP2r (ORCPT ); Thu, 18 Sep 2014 11:28:47 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:47325 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbaIRP2p (ORCPT ); Thu, 18 Sep 2014 11:28:45 -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 <0NC3005YUSBVBV80@mailout3.samsung.com>; Fri, 19 Sep 2014 00:28:43 +0900 (KST) X-AuditID: cbfee61b-f79f86d00000144c-9d-541afa2b42f9 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 4D.E1.05196.B2AFA145; Fri, 19 Sep 2014 00:28:43 +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:43 +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 07/33] thermal: exynos: remove needless therm_trip_en_shift abstraction Date: Thu, 18 Sep 2014 17:27:24 +0200 Message-id: <1411054070-25757-8-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+NgFprHLMWRmVeSWpSXmKPExsVy+t9jAV3tX1IhBm1XJC0aroZYbJyxntXi 7vPDjBbzr1xjtTjb9Ibd4s3DzYwWl3fNYbP43HuE0WLG+X1MFk8e9rE5cHnsnHWX3WPxnpdM Hn1bVjF6fN4kF8ASxWWTkpqTWZZapG+XwJXROvcFU0GjasWLGQ+YGxg/yHcxcnJICJhI7P1y iAnCFpO4cG89WxcjF4eQwCJGiX2z1zBBOF1MEr2NL8Cq2ASsJCa2r2IEsUUEtCROXNoOVsQs cItJ4vWNyWAJYYFIifMrr7KD2CwCqhJzpjwDi/MKeEjM3XmBHWKdokT3swlsIDangKdEw61N YHEhoJq2LXeZJzDyLmBkWMUomlqQXFCclJ5rpFecmFtcmpeul5yfu4kRHGrPpHcwrmqwOMQo wMGoxMN7gFcqRIg1say4MvcQowQHs5II75+PQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8B1ut A4UE0hNLUrNTUwtSi2CyTBycUg2Ma+b9sv6uoxRmnvvX5WX/75TrL1QOrG3lVT522uTWxHer oxqXbt+9Su0cV4jvGc1185eyXGe+7nv/yyb7W9LLnzIqvzJsv/7ye/cEY4W6mPnaXM3Lz0q1 TZRzu+lr8P8d/3/1wncz9LSX59vcihZ8ftDxZWRS9Jz/K/XufXs4K6zqQO7p5oYyeyWW4oxE Qy3mouJEABfPi9kxAgAA 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->therm_trip_en_shift is used only in exynos_tmu_initialize() and not accessed on Exynos4210 (also reg->therm_trip_en_shift is not even assigned in exynos4210_tmu_registers but it is assigned to identical value for all other SoC types) so the register abstraction is not needed and can be removed. 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 | 2 +- drivers/thermal/samsung/exynos_tmu.h | 2 -- drivers/thermal/samsung/exynos_tmu_data.c | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 7c9793a..350a1f5 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -251,7 +251,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev) data->base + reg->threshold_th2); } con = readl(data->base + reg->tmu_ctrl); - con |= (1 << reg->therm_trip_en_shift); + con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT); writel(con, data->base + reg->tmu_ctrl); } } diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 6341d74..8f5ffcb 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -77,7 +77,6 @@ enum soc_type { * bitfields. The register validity, offsets and bitfield values may vary * slightly across different exynos SOC's. * @tmu_ctrl: TMU main controller register. - * @therm_trip_en_shift: shift bits of tripping enable in tmu_ctrl register. * @tmu_cur_temp: register containing the current temperature of the TMU. * @threshold_th0: Register containing first set of rising levels. * @threshold_th1: Register containing second set of rising levels. @@ -104,7 +103,6 @@ enum soc_type { */ struct exynos_tmu_registers { u32 tmu_ctrl; - u32 therm_trip_en_shift; u32 tmu_cur_temp; diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index 22a0ade..a37f490 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c @@ -84,7 +84,6 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS3250) static const struct exynos_tmu_registers exynos3250_tmu_registers = { .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, - .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th1 = EXYNOS_THD_TEMP_FALL, @@ -161,7 +160,6 @@ struct exynos_tmu_init_data const exynos3250_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) static const struct exynos_tmu_registers exynos4412_tmu_registers = { .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, - .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th1 = EXYNOS_THD_TEMP_FALL, @@ -251,7 +249,6 @@ struct exynos_tmu_init_data const exynos5250_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS5260) static const struct exynos_tmu_registers exynos5260_tmu_registers = { .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, - .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th1 = EXYNOS_THD_TEMP_FALL, @@ -330,7 +327,6 @@ struct exynos_tmu_init_data const exynos5260_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS5420) static const struct exynos_tmu_registers exynos5420_tmu_registers = { .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, - .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, .threshold_th0 = EXYNOS_THD_TEMP_RISE, .threshold_th1 = EXYNOS_THD_TEMP_FALL, @@ -417,7 +413,6 @@ struct exynos_tmu_init_data const exynos5420_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS5440) static const struct exynos_tmu_registers exynos5440_tmu_registers = { .tmu_ctrl = EXYNOS5440_TMU_S0_7_CTRL, - .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, .tmu_cur_temp = EXYNOS5440_TMU_S0_7_TEMP, .threshold_th0 = EXYNOS5440_TMU_S0_7_TH0, .threshold_th1 = EXYNOS5440_TMU_S0_7_TH1,