From patchwork Wed Aug 16 08:19:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 110215 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp474037qge; Wed, 16 Aug 2017 01:19:33 -0700 (PDT) X-Received: by 10.84.230.137 with SMTP id e9mr989757plk.71.1502871572962; Wed, 16 Aug 2017 01:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502871572; cv=none; d=google.com; s=arc-20160816; b=C9ykq7hmutnYbQtWOWucmsrCbRenpduVqUNB0FEDwGL3s6vSZt+QnLZLHuVBV39iBp Luh9v1jWkghRO72N21yHwBUBnwpwoGihnXxDyUHpY5KENEZpVJaDVOklLv+EvR1ixkg3 LkdOnHmnJSGFO0eqwgu/MECVhKb/725c9eCOOoYBrvAf1zdZ34zEi24+veVFsUdiUOhO lKpGzRo8vDL4iugrDZSpbh/e0ukwRnJHd3aJ7nbw3rZaoSPvbQpoWUbs7wGbEcIJ863G EcT5bW2kCYuYCN+eY1T50Moqug7THBf6NrPaGoqgR8ekTuXshCbRtStfd2oUv42+6jIk XVRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=gCC9jiqaO+sSqOrAmoq9QiE+g+IBRdF7rrRAvWyDVrs=; b=nCyVXs7Edyn1fNPO6HR8lNdAVwKuZN7vY/matguvupTM7MIIz1TVMcN2BIbSn378PZ jW5R7rNk7DF9qJiDg8SGqd+G8fwzd5vpBRgz9MFnm1oh9Uu8G2FGO7A/1RaZEnbnv5dO Rqd3qdoBytAy8L8FD3HYLHqmAXKqJC8dOP6xhxxPFlGiBtL5SpdJj2nGqSQSV8PVJeqq LMKApMYr/A2W5GrhneHb35oVyK1q37Aumz/2sEsRuLbd4ydfYoRg6RkTvACNYWzEUMhm aqom9gGODNEFY4p9eG+sn3wXy9wHjCponFJTJdS2Y0uxd0xnd072Njtg73avXTCGGzVp uxng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IsJAhquz; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si180762pgc.354.2017.08.16.01.19.32; Wed, 16 Aug 2017 01:19:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IsJAhquz; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751702AbdHPITb (ORCPT + 12 others); Wed, 16 Aug 2017 04:19:31 -0400 Received: from mail-lf0-f47.google.com ([209.85.215.47]:37767 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbdHPITa (ORCPT ); Wed, 16 Aug 2017 04:19:30 -0400 Received: by mail-lf0-f47.google.com with SMTP id m86so13202333lfi.4 for ; Wed, 16 Aug 2017 01:19:29 -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=gCC9jiqaO+sSqOrAmoq9QiE+g+IBRdF7rrRAvWyDVrs=; b=IsJAhquzY3WhLHzTCDrGgJVDKF4zd96o5a27vH3TQ98jqUbDFT1lYcbQIvMBdQQM+n YBqlVtPh5mdHObEFW4HqgsDfqNgTKJi+l1SdvlF+G/wqGx/ND2CrNSaFTXsXys61EYi/ d0QdtouQcd8pXh0hDpYdLUJgc7ZI2Jt3OVgCE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gCC9jiqaO+sSqOrAmoq9QiE+g+IBRdF7rrRAvWyDVrs=; b=S+RS478p+QqLmLNO4r32RCfKdpHtQwL3lUy0/P4eovQ4U2/7sZwvUDSTdtCW6k7+/i M+WPt1HAJwyg/LmczS1UER9XAWhUrqUOMv2ux/yrqdtOk7563nIe1r1Mtq+Bi8iM04lr b2iF9Yqd5BpW+YD7WdOxjeUC1yk1l3Joh+++Oyf9udoHodTGhMSBAtQtPNeWsNHbWXg6 usfZcYOMBqYRyHFom4OoxF27Q2h2zO6C4+IaD2kbT41ol0IYk+9uAF7NtTn/oruX+vAX qEaxHS7qqkhLpmuDZn6ypcSJ5aQFjySRW9I6yIgOTrX+8F1NCSLfNoASICuZw28zRuch 1MOA== X-Gm-Message-State: AHYfb5g67G/wKvNMxJeIB8zkwvWnL+n21pdH1OjBA5aAqRKCPgTHKyJk 924i0lS5Qmkt+69r X-Received: by 10.25.83.220 with SMTP id h89mr363628lfl.126.1502871568847; Wed, 16 Aug 2017 01:19:28 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id g41sm70742lji.94.2017.08.16.01.19.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Aug 2017 01:19:28 -0700 (PDT) From: Linus Walleij To: "Rafael J . Wysocki" , Viresh Kumar , Lee Jones Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Ulf Hansson , Linus Walleij Subject: [PATCH 3/3 v2] cpufreq: dbx500: Delete obsolete driver Date: Wed, 16 Aug 2017 10:19:14 +0200 Message-Id: <20170816081914.30471-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170816081914.30471-1-linus.walleij@linaro.org> References: <20170816081914.30471-1-linus.walleij@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org We have moved the Ux500 over to use the generic DT based cpufreq driver, so delete the old custom driver. At the same time select CPUFREQ_DT from the machine's Kconfig in order to satisfy the "default ARCH_U8500" selection on the old driver. Acked-by: Viresh Kumar Signed-off-by: Linus Walleij --- ChangeLog v1-v2: - Added Viresh's ACK. Please apply this to the cpufreq tree. --- arch/arm/mach-ux500/Kconfig | 1 + drivers/cpufreq/Kconfig.arm | 9 ---- drivers/cpufreq/Makefile | 1 - drivers/cpufreq/dbx500-cpufreq.c | 103 --------------------------------------- 4 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 drivers/cpufreq/dbx500-cpufreq.c -- 2.13.5 diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 4740ac393297..2b56e4af5a27 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig @@ -9,6 +9,7 @@ menuconfig ARCH_U8500 select ARM_GIC select CACHE_L2X0 select CLKSRC_NOMADIK_MTU + select CPUFREQ_DT select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 2011fec2d6ad..74ed7e9a7f27 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -71,15 +71,6 @@ config ARM_HIGHBANK_CPUFREQ If in doubt, say N. -config ARM_DB8500_CPUFREQ - tristate "ST-Ericsson DB8500 cpufreq" if COMPILE_TEST && !ARCH_U8500 - default ARCH_U8500 - depends on HAS_IOMEM - depends on !CPU_THERMAL || THERMAL - help - This adds the CPUFreq driver for ST-Ericsson Ux500 (DB8500) SoC - series. - config ARM_IMX6Q_CPUFREQ tristate "Freescale i.MX6 cpufreq support" depends on ARCH_MXC diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index ab3a42cd29ef..a07c6efe4910 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -53,7 +53,6 @@ obj-$(CONFIG_ARM_DT_BL_CPUFREQ) += arm_big_little_dt.o obj-$(CONFIG_ARM_BRCMSTB_AVS_CPUFREQ) += brcmstb-avs-cpufreq.o obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o -obj-$(CONFIG_ARM_DB8500_CPUFREQ) += dbx500-cpufreq.o obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c deleted file mode 100644 index 4ee0431579c1..000000000000 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) STMicroelectronics 2009 - * Copyright (C) ST-Ericsson SA 2010-2012 - * - * License Terms: GNU General Public License v2 - * Author: Sundar Iyer - * Author: Martin Persson - * Author: Jonas Aaberg - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static struct cpufreq_frequency_table *freq_table; -static struct clk *armss_clk; -static struct thermal_cooling_device *cdev; - -static int dbx500_cpufreq_target(struct cpufreq_policy *policy, - unsigned int index) -{ - /* update armss clk frequency */ - return clk_set_rate(armss_clk, freq_table[index].frequency * 1000); -} - -static int dbx500_cpufreq_init(struct cpufreq_policy *policy) -{ - policy->clk = armss_clk; - return cpufreq_generic_init(policy, freq_table, 20 * 1000); -} - -static int dbx500_cpufreq_exit(struct cpufreq_policy *policy) -{ - if (!IS_ERR(cdev)) - cpufreq_cooling_unregister(cdev); - return 0; -} - -static void dbx500_cpufreq_ready(struct cpufreq_policy *policy) -{ - cdev = cpufreq_cooling_register(policy); - if (IS_ERR(cdev)) - pr_err("Failed to register cooling device %ld\n", PTR_ERR(cdev)); - else - pr_info("Cooling device registered: %s\n", cdev->type); -} - -static struct cpufreq_driver dbx500_cpufreq_driver = { - .flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS | - CPUFREQ_NEED_INITIAL_FREQ_CHECK, - .verify = cpufreq_generic_frequency_table_verify, - .target_index = dbx500_cpufreq_target, - .get = cpufreq_generic_get, - .init = dbx500_cpufreq_init, - .exit = dbx500_cpufreq_exit, - .ready = dbx500_cpufreq_ready, - .name = "DBX500", - .attr = cpufreq_generic_attr, -}; - -static int dbx500_cpufreq_probe(struct platform_device *pdev) -{ - struct cpufreq_frequency_table *pos; - - freq_table = dev_get_platdata(&pdev->dev); - if (!freq_table) { - pr_err("dbx500-cpufreq: Failed to fetch cpufreq table\n"); - return -ENODEV; - } - - armss_clk = clk_get(&pdev->dev, "armss"); - if (IS_ERR(armss_clk)) { - pr_err("dbx500-cpufreq: Failed to get armss clk\n"); - return PTR_ERR(armss_clk); - } - - pr_info("dbx500-cpufreq: Available frequencies:\n"); - cpufreq_for_each_entry(pos, freq_table) - pr_info(" %d Mhz\n", pos->frequency / 1000); - - return cpufreq_register_driver(&dbx500_cpufreq_driver); -} - -static struct platform_driver dbx500_cpufreq_plat_driver = { - .driver = { - .name = "cpufreq-ux500", - }, - .probe = dbx500_cpufreq_probe, -}; - -static int __init dbx500_cpufreq_register(void) -{ - return platform_driver_register(&dbx500_cpufreq_plat_driver); -} -device_initcall(dbx500_cpufreq_register); - -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("cpufreq driver for DBX500");