From nobody Mon Feb 9 10:11:34 2026 Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD11033D4FD; Thu, 8 Jan 2026 08:26:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767860824; cv=none; b=bKXikeBz+nnCdPFS9ngjFvrm8Dfro7V9KkGxBPO/qToQSGiCCt0VAtvbX8x/a84Tw44ajquQkMxMtK5DIfofB7IBpjoy35aXV8JjQviYi2WXE70qpYkQ6t1f6bk1Gg2ktZQQTn15JBo9UYOS2OqVlwwcYpXElQIrQEVuT2P2nME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767860824; c=relaxed/simple; bh=cIINlx0pXAnhuBkTj6tCzNyC+6r8c+Me4t0PkzSNasg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qhtYQpndv02o6xjtpZwDWE6/lRXaGYmUmIuG8zjAQE4lE8PVgIVRGL6eA9gjC+3IrviSedlOrwsAEkhbMZAnd5ffYRYK2Gi3wgW56AJD8f4JjeUKb1WOxwkNM+ZmRjxfAzRFTgj2AuzRmBZheQETfna6vxxAN2XICueIynxvNXA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=6VPKs3cy; arc=none smtp.client-ip=178.238.236.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="6VPKs3cy" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Cc:In-Reply-To:References:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=X8ocl7fu5fatFsxlNtJzRAbZiPjohuelEktVlKMH2EA=; b=6VPKs3cyCFcmNeI/nFGcBPGvIt 7xeYKFD5mq5/tarj1wZR2mKwb3xs0zuYC6ZhVThhaM4hNGYzvUsFi/4/zHffXaUwr0BDjrZDX21oa eGxQlDTMOvUHsZ1zs/r418oBrp8Yfb0C3f12FGCjqwAsak9EUFXDmj1vGYklb40aAv8uYOy3oxqCY 6tra0/NIxe4aRPIVrxjofRPgC4WA2rwBraEbSgTBskCsQYcIh9ENjLsivGqAILuzmcWTjefgrLGfQ 6gHi/ABhH0dYhbwgyhl4abNexMlOjopwod0KUIQxq+bTx0V6kxQMr6wH1ztaSC+hvmbvRGT4XeIna eSDWEgZw==; From: Andreas Kemnade Date: Thu, 08 Jan 2026 09:26:12 +0100 Subject: [PATCH 1/2] cpufreq: omap: remove driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260108-omap-cpufreq-removal-v1-1-8fe42f130f48@kemnade.info> References: <20260108-omap-cpufreq-removal-v1-0-8fe42f130f48@kemnade.info> In-Reply-To: <20260108-omap-cpufreq-removal-v1-0-8fe42f130f48@kemnade.info> To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , linux-omap@vger.kernel.org X-Mailer: b4 0.15-dev-a6db3 X-Developer-Signature: v=1; a=openpgp-sha256; l=7474; i=andreas@kemnade.info; h=from:subject:message-id; bh=cIINlx0pXAnhuBkTj6tCzNyC+6r8c+Me4t0PkzSNasg=; b=owGbwMvMwCUm/rzkS6lq2x3G02pJDJnxWZYP5D4VHDUX7HLOUTSRnrN36YJ9B99I9Jtrsr42f KEStNeqo5SFQYyLQVZMkeWXtYLbJ5VnucFTI+xh5rAygQxh4OIUgInU7GT4X5H3zsY1/JGdZVrk l1y+TZUffk/1uRLooGpTO80zNMl8M8Nfgc0pnzTs2UtUlO4ZPK9Uy3Raou9x7sDltfMdqiyd2he yAQA= X-Developer-Key: i=andreas@kemnade.info; a=openpgp; fpr=EEC0DB858E66C0DA70620AC07DBD6AC74DE29324 The omap-cpufreq driver is not used in the corresponding defconfigs. The pseudo platform device to use it was removed by commit cb6675d6a868 ("ARM: OMAP2+: Remove legacy PM init") 10 years ago. Checking if there is any need to reactivate it: For omap3, dra7 there is ti-cpufreq to create cpufreq-dt device For omap2/4/5 there is cpufreq-dt-plat to create cpufreq-dt device. For omap1 this driver cannot be selected at all. So no users, no need to reactivate the driver somehow. So remove it. Signed-off-by: Andreas Kemnade Acked-by: Kevin Hilman --- drivers/cpufreq/Kconfig.arm | 5 -- drivers/cpufreq/Makefile | 1 - drivers/cpufreq/omap-cpufreq.c | 195 -------------------------------------= ---- 3 files changed, 201 deletions(-) diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 9be0503df55a0..4014bc9dd73a2 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -141,11 +141,6 @@ config ARM_MEDIATEK_CPUFREQ_HW The driver implements the cpufreq interface for this HW engine. Say Y if you want to support CPUFreq HW. =20 -config ARM_OMAP2PLUS_CPUFREQ - bool "TI OMAP2+" - depends on ARCH_OMAP2PLUS || COMPILE_TEST - default ARCH_OMAP2PLUS - config ARM_QCOM_CPUFREQ_NVMEM tristate "Qualcomm nvmem based CPUFreq" depends on ARCH_QCOM || COMPILE_TEST diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 681d687b5a18e..385c9fcc65c62 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -69,7 +69,6 @@ obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) +=3D kirkwood-cpufreq.o obj-$(CONFIG_ARM_MEDIATEK_CPUFREQ) +=3D mediatek-cpufreq.o obj-$(CONFIG_ARM_MEDIATEK_CPUFREQ_HW) +=3D mediatek-cpufreq-hw.o obj-$(CONFIG_MACH_MVEBU_V7) +=3D mvebu-cpufreq.o -obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) +=3D omap-cpufreq.o obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) +=3D pxa2xx-cpufreq.o obj-$(CONFIG_PXA3xx) +=3D pxa3xx-cpufreq.o obj-$(CONFIG_ARM_QCOM_CPUFREQ_HW) +=3D qcom-cpufreq-hw.o diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c deleted file mode 100644 index bbb01d93b54b1..0000000000000 --- a/drivers/cpufreq/omap-cpufreq.c +++ /dev/null @@ -1,195 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * CPU frequency scaling for OMAP using OPP information - * - * Copyright (C) 2005 Nokia Corporation - * Written by Tony Lindgren - * - * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King - * - * Copyright (C) 2007-2011 Texas Instruments, Inc. - * - OMAP3/4 support by Rajendra Nayak, Santosh Shilimkar - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* OPP tolerance in percentage */ -#define OPP_TOLERANCE 4 - -static struct cpufreq_frequency_table *freq_table; -static atomic_t freq_table_users =3D ATOMIC_INIT(0); -static struct device *mpu_dev; -static struct regulator *mpu_reg; - -static int omap_target(struct cpufreq_policy *policy, unsigned int index) -{ - int r, ret; - struct dev_pm_opp *opp; - unsigned long freq, volt =3D 0, volt_old =3D 0, tol =3D 0; - unsigned int old_freq, new_freq; - - old_freq =3D policy->cur; - new_freq =3D freq_table[index].frequency; - - freq =3D new_freq * 1000; - ret =3D clk_round_rate(policy->clk, freq); - if (ret < 0) { - dev_warn(mpu_dev, - "CPUfreq: Cannot find matching frequency for %lu\n", - freq); - return ret; - } - freq =3D ret; - - if (mpu_reg) { - opp =3D dev_pm_opp_find_freq_ceil(mpu_dev, &freq); - if (IS_ERR(opp)) { - dev_err(mpu_dev, "%s: unable to find MPU OPP for %d\n", - __func__, new_freq); - return -EINVAL; - } - volt =3D dev_pm_opp_get_voltage(opp); - dev_pm_opp_put(opp); - tol =3D volt * OPP_TOLERANCE / 100; - volt_old =3D regulator_get_voltage(mpu_reg); - } - - dev_dbg(mpu_dev, "cpufreq-omap: %u MHz, %ld mV --> %u MHz, %ld mV\n",=20 - old_freq / 1000, volt_old ? volt_old / 1000 : -1, - new_freq / 1000, volt ? volt / 1000 : -1); - - /* scaling up? scale voltage before frequency */ - if (mpu_reg && (new_freq > old_freq)) { - r =3D regulator_set_voltage(mpu_reg, volt - tol, volt + tol); - if (r < 0) { - dev_warn(mpu_dev, "%s: unable to scale voltage up.\n", - __func__); - return r; - } - } - - ret =3D clk_set_rate(policy->clk, new_freq * 1000); - - /* scaling down? scale voltage after frequency */ - if (mpu_reg && (new_freq < old_freq)) { - r =3D regulator_set_voltage(mpu_reg, volt - tol, volt + tol); - if (r < 0) { - dev_warn(mpu_dev, "%s: unable to scale voltage down.\n", - __func__); - clk_set_rate(policy->clk, old_freq * 1000); - return r; - } - } - - return ret; -} - -static inline void freq_table_free(void) -{ - if (atomic_dec_and_test(&freq_table_users)) - dev_pm_opp_free_cpufreq_table(mpu_dev, &freq_table); -} - -static int omap_cpu_init(struct cpufreq_policy *policy) -{ - int result; - - policy->clk =3D clk_get(NULL, "cpufreq_ck"); - if (IS_ERR(policy->clk)) - return PTR_ERR(policy->clk); - - if (!freq_table) { - result =3D dev_pm_opp_init_cpufreq_table(mpu_dev, &freq_table); - if (result) { - dev_err(mpu_dev, - "%s: cpu%d: failed creating freq table[%d]\n", - __func__, policy->cpu, result); - clk_put(policy->clk); - return result; - } - } - - atomic_inc_return(&freq_table_users); - - /* FIXME: what's the actual transition time? */ - cpufreq_generic_init(policy, freq_table, 300 * 1000); - - return 0; -} - -static void omap_cpu_exit(struct cpufreq_policy *policy) -{ - freq_table_free(); - clk_put(policy->clk); -} - -static struct cpufreq_driver omap_driver =3D { - .flags =3D CPUFREQ_NEED_INITIAL_FREQ_CHECK, - .verify =3D cpufreq_generic_frequency_table_verify, - .target_index =3D omap_target, - .get =3D cpufreq_generic_get, - .init =3D omap_cpu_init, - .exit =3D omap_cpu_exit, - .register_em =3D cpufreq_register_em_with_opp, - .name =3D "omap", -}; - -static int omap_cpufreq_probe(struct platform_device *pdev) -{ - mpu_dev =3D get_cpu_device(0); - if (!mpu_dev) { - pr_warn("%s: unable to get the MPU device\n", __func__); - return -EINVAL; - } - - mpu_reg =3D regulator_get(mpu_dev, "vcc"); - if (IS_ERR(mpu_reg)) { - pr_warn("%s: unable to get MPU regulator\n", __func__); - mpu_reg =3D NULL; - } else { - /*=20 - * Ensure physical regulator is present. - * (e.g. could be dummy regulator.) - */ - if (regulator_get_voltage(mpu_reg) < 0) { - pr_warn("%s: physical regulator not present for MPU\n", - __func__); - regulator_put(mpu_reg); - mpu_reg =3D NULL; - } - } - - return cpufreq_register_driver(&omap_driver); -} - -static void omap_cpufreq_remove(struct platform_device *pdev) -{ - cpufreq_unregister_driver(&omap_driver); -} - -static struct platform_driver omap_cpufreq_platdrv =3D { - .driver =3D { - .name =3D "omap-cpufreq", - }, - .probe =3D omap_cpufreq_probe, - .remove =3D omap_cpufreq_remove, -}; -module_platform_driver(omap_cpufreq_platdrv); - -MODULE_DESCRIPTION("cpufreq driver for OMAP SoCs"); -MODULE_LICENSE("GPL"); --=20 2.47.3 From nobody Mon Feb 9 10:11:34 2026 Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 089C4350D41; Thu, 8 Jan 2026 08:26:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767860831; cv=none; b=spQilgJ026Td4CGbnB/BUUr5Xcgv2yuOkS69wVvkNv6IfJVILhfgQNSz5ks2zXdt+qlML31s0TrahGe3inkW4swlu6Oeha1dKUYYzMBO4camkBU6be/o9LeNaffgfJh8R28V+NM5x4HIsN1EIcLTm0a6BLJAUG+ueQe60Qe9JtA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767860831; c=relaxed/simple; bh=ye9EsldyVtkyFEEHWlpwVnLNt05/xILj4xvBjgVBhPU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KSD7Du++d1v9lM9lnPFTmf7/LtmsQ2ryw8pzi+5n/thwm6EdshAQiwpKGR/1OdkyhVsOJWviHP+AW/U2SMS1E6NuMVZAXIeqHsOVAewHcAAVrTGe/H9HJvHiUx5YO2uyL6IVSSdErJSZtAe/4QlNspzMim6Q/rjCEX7vhjCr/WE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=KJej+N6e; arc=none smtp.client-ip=178.238.236.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="KJej+N6e" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Cc:In-Reply-To:References:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=sgbPhfaFLVrbkpz4PqBhY7w/yeiN7lhQkPSEva2tULE=; b=KJej+N6egpcNSGRSIDDDiXm34j gRfFIreBUNUNlzGuOq+WgHgSKu7wyoNXUu932sCL317b9/pJ6Is2aG7JAlLEFMiw5lGVNASJ0yBsM LYYTMaQuhOudmvK7tyRAJWSe7yfga0yckzLGfEnPYN7u06/3rzUbWMimuw4qsYSzJHJHjiLusFhBk Z05oqBHymIn5XrSc+MnzfgAz9DMf0ZYTyn1tAk0WuPoHVi3Wt/Hv5Nkz8RlbbWAlcdhkmB3uzzy0I Pqlwe8bpm1gQsXDCXe68r5NJuN1gRi6QNNu5nLpBZpsPS5N7Iuuz5EmDe4ilYLTLYUv2df7esG3Wo vmIM0/kQ==; From: Andreas Kemnade Date: Thu, 08 Jan 2026 09:26:13 +0100 Subject: [PATCH 2/2] MAINTAINERS: remove omap-cpufreq Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260108-omap-cpufreq-removal-v1-2-8fe42f130f48@kemnade.info> References: <20260108-omap-cpufreq-removal-v1-0-8fe42f130f48@kemnade.info> In-Reply-To: <20260108-omap-cpufreq-removal-v1-0-8fe42f130f48@kemnade.info> To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , linux-omap@vger.kernel.org X-Mailer: b4 0.15-dev-a6db3 X-Developer-Signature: v=1; a=openpgp-sha256; l=564; i=andreas@kemnade.info; h=from:subject:message-id; bh=ye9EsldyVtkyFEEHWlpwVnLNt05/xILj4xvBjgVBhPU=; b=owGbwMvMwCUm/rzkS6lq2x3G02pJDJnxWZZd7ib110zc2gLvvfJlZyxfOYnvsInGG5d7AnMvF M8X1BToKGVhEONikBVTZPllreD2SeVZbvDUCHuYOaxMIEMYuDgFYCLbFRn++3/cOuG1jA3POQZu iVdWYn09JzeUN0XrFJypMF5Sz/34M8P/7AnHDl0L1HlV0ODdG6pmdd3F/oH19b/PWSZLX1ffEL+ aFwA= X-Developer-Key: i=andreas@kemnade.info; a=openpgp; fpr=EEC0DB858E66C0DA70620AC07DBD6AC74DE29324 Remove entry for omap-cpufreq, since it is removed. Signed-off-by: Andreas Kemnade Acked-by: Kevin Hilman --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 765ad2daa2183..1065195a22ce2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19132,7 +19132,6 @@ M: Kevin Hilman L: linux-omap@vger.kernel.org S: Maintained F: arch/arm/*omap*/*pm* -F: drivers/cpufreq/omap-cpufreq.c =20 OMAP POWERDOMAIN SOC ADAPTATION LAYER SUPPORT M: Paul Walmsley --=20 2.47.3