From patchwork Wed Sep 14 13:27:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 9331495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 86B7D60231 for ; Wed, 14 Sep 2016 13:33:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 778B029E55 for ; Wed, 14 Sep 2016 13:33:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C3B129E57; Wed, 14 Sep 2016 13:33:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F54529E55 for ; Wed, 14 Sep 2016 13:33:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkAIK-0004cV-VO; Wed, 14 Sep 2016 13:32:08 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkAFo-0001fO-9K for linux-arm-kernel@lists.infradead.org; Wed, 14 Sep 2016 13:29:34 +0000 Received: by mail-wm0-x231.google.com with SMTP id b187so47343074wme.1 for ; Wed, 14 Sep 2016 06:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=27lKobwbe9kfXF9nFcwOChJNuUfl2bK5j2jLIf9Vle8=; b=gTHjRqkU2s66oqxsa6B+njoI4OWa28onXJDp7Zsr38s7DcKmrtt6hBTEgJsgIPkCES fgrSDyezgI4iNlrfjqfKwP2e46woYdB0S0HtppGtJn8dI+hbvM8oRTdiLjemWtCzrPjh AGO9RRp7QNQPXrSrqhqSNjsdv5nxFIYJjEOwU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=27lKobwbe9kfXF9nFcwOChJNuUfl2bK5j2jLIf9Vle8=; b=WzFdSKEtkSp4TkhmnsXz/sv9bDIEiNW4uNP7hiGJT9pNYY3qZO6fG2S2OdiffjVvzT Gx7vaT+68OfNnqp9/spP0oS8YsxPjE9bf2mTKqLJ7zWLOqCvPnVy64It0hlx+7SPjCEf ATBMi1W2W82xQNjclAgsxr5eXXmHYW3+riUG4BT3K6Ump0hQlsQetCf8QsUVNTGRKi4s naSWx+cV6ruO0AD61CWyfLMuz1M8wcrWgXPPJKkMt3FbbU3kbU2QhLz1BjphZwZf/se/ sEMNBtCEpc47JaVpVn9FQXx9gOBX001G+rp5OzXYv7mzATQhFyPkwsAPP7breBPUf8My H/Ig== X-Gm-Message-State: AE9vXwPekI5QrksuSAUwC+ZNQIy2ZCRtzHd4B3SRcVNbBx1cXuSrXtZxg/jwUXxAdrbyUIju X-Received: by 10.194.94.225 with SMTP id df1mr3183741wjb.51.1473859751540; Wed, 14 Sep 2016 06:29:11 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust4998.18-1.cable.virginm.net. [86.31.179.135]) by smtp.gmail.com with ESMTPSA id c5sm4212812wjw.29.2016.09.14.06.29.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 06:29:10 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, devicetree@vger.kernel.org Subject: [PATCH 09/19] thermal: sti: Remove obsolete STiH416 platform support. Date: Wed, 14 Sep 2016 14:27:47 +0100 Message-Id: <1473859677-9231-10-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473859677-9231-1-git-send-email-peter.griffin@linaro.org> References: <1473859677-9231-1-git-send-email-peter.griffin@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160914_062932_547012_1B3A3392 X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.griffin@linaro.org, edubezval@gmail.com, rui.zhang@intel.com, lee.jones@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP STiH415/6 SoC support is being removed from the kernel. This patch removes support from the thermal driver. Also it updates the register defines and removes the SoC and die prefix as neither of these are relevant in the context of STiH407 based silicon (STiH415/6 were dual die SoCs with an MPE die and SAS die). Signed-off-by: Peter Griffin Cc: Cc: --- drivers/thermal/st/st_thermal_memmap.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/thermal/st/st_thermal_memmap.c b/drivers/thermal/st/st_thermal_memmap.c index fc0c9e1..d53965d 100644 --- a/drivers/thermal/st/st_thermal_memmap.c +++ b/drivers/thermal/st/st_thermal_memmap.c @@ -15,10 +15,10 @@ #include "st_thermal.h" -#define STIH416_MPE_CONF 0x0 -#define STIH416_MPE_STATUS 0x4 -#define STIH416_MPE_INT_THRESH 0x8 -#define STIH416_MPE_INT_EN 0xC +#define CONF 0x0 +#define STATUS 0x4 +#define INT_THRESH 0x8 +#define INT_EN 0xC /* Power control bits for the memory mapped thermal sensor */ #define THERMAL_PDN BIT(4) @@ -31,11 +31,11 @@ static const struct reg_field st_mmap_thermal_regfields[MAX_REGFIELDS] = { * written simultaneously for powering on and off the temperature * sensor. regmap_update_bits() will be used to update the register. */ - [INT_THRESH_HI] = REG_FIELD(STIH416_MPE_INT_THRESH, 0, 7), - [DCORRECT] = REG_FIELD(STIH416_MPE_CONF, 5, 9), - [OVERFLOW] = REG_FIELD(STIH416_MPE_STATUS, 9, 9), - [DATA] = REG_FIELD(STIH416_MPE_STATUS, 11, 18), - [INT_ENABLE] = REG_FIELD(STIH416_MPE_INT_EN, 0, 0), + [INT_THRESH_HI] = REG_FIELD(INT_THRESH, 0, 7), + [DCORRECT] = REG_FIELD(CONF, 5, 9), + [OVERFLOW] = REG_FIELD(STATUS, 9, 9), + [DATA] = REG_FIELD(STATUS, 11, 18), + [INT_ENABLE] = REG_FIELD(INT_EN, 0, 0), }; static irqreturn_t st_mmap_thermal_trip_handler(int irq, void *sdata) @@ -54,7 +54,7 @@ static int st_mmap_power_ctrl(struct st_thermal_sensor *sensor, const unsigned int mask = (THERMAL_PDN | THERMAL_SRSTN); const unsigned int val = power_state ? mask : 0; - return regmap_update_bits(sensor->regmap, STIH416_MPE_CONF, mask, val); + return regmap_update_bits(sensor->regmap, CONF, mask, val); } static int st_mmap_alloc_regfields(struct st_thermal_sensor *sensor) @@ -114,7 +114,7 @@ static int st_mmap_register_enable_irq(struct st_thermal_sensor *sensor) return st_mmap_enable_irq(sensor); } -static const struct regmap_config st_416mpe_regmap_config = { +static const struct regmap_config st_thermal_regmap_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, @@ -139,7 +139,7 @@ static int st_mmap_regmap_init(struct st_thermal_sensor *sensor) } sensor->regmap = devm_regmap_init_mmio(dev, sensor->mmio_base, - &st_416mpe_regmap_config); + &st_thermal_regmap_config); if (IS_ERR(sensor->regmap)) { dev_err(dev, "failed to initialise regmap\n"); return PTR_ERR(sensor->regmap); @@ -156,15 +156,6 @@ static const struct st_thermal_sensor_ops st_mmap_sensor_ops = { .enable_irq = st_mmap_enable_irq, }; -/* Compatible device data stih416 mpe thermal sensor */ -static const struct st_thermal_compat_data st_416mpe_cdata = { - .reg_fields = st_mmap_thermal_regfields, - .ops = &st_mmap_sensor_ops, - .calibration_val = 14, - .temp_adjust_val = -95, - .crit_temp = 120, -}; - /* Compatible device data stih407 thermal sensor */ static const struct st_thermal_compat_data st_407_cdata = { .reg_fields = st_mmap_thermal_regfields, @@ -175,7 +166,6 @@ static const struct st_thermal_compat_data st_407_cdata = { }; static const struct of_device_id st_mmap_thermal_of_match[] = { - { .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata }, { .compatible = "st,stih407-thermal", .data = &st_407_cdata }, { /* sentinel */ } };