Commit 6af3aab6 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge tag 'cpufreq-arm-updates-6.12' of...

Merge tag 'cpufreq-arm-updates-6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

Merge ARM cpufreq updates for 6.12 from Viresh Kumar:

"- Several OF related cleanups in cpufreq drivers (Rob Herring).

 - Enable COMPILE_TEST for ARM drivers (Rob Herrring).

 - Introduce quirks for syscon failures and use socinfo to get revision
   for TI cpufreq driver (Dhruva Gole and Nishanth Menon).

 - Minor cleanups in amd-pstate driver (Anastasia Belova and Dhananjay
   Ugwekar).

 - Minor cleanups for loongson, cpufreq-dt and powernv cpufreq drivers
   (Danila Tikhonov, Huacai Chen, and Liu Jing)."

* tag 'cpufreq-arm-updates-6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  cpufreq: ti-cpufreq: Use socinfo to get revision in AM62 family
  cpufreq: Fix the cacography in powernv-cpufreq.c
  cpufreq: ti-cpufreq: Introduce quirks to handle syscon fails appropriately
  cpufreq: loongson3: Use raw_smp_processor_id() in do_service_request()
  cpufreq: amd-pstate: add check for cpufreq_cpu_get's return value
  cpufreq: Add SM7325 to cpufreq-dt-platdev blocklist
  cpufreq: Fix warning on unused of_device_id tables for !CONFIG_OF
  cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
  cpufreq: Drop CONFIG_ARM and CONFIG_ARM64 dependency on Arm drivers
  cpufreq: Enable COMPILE_TEST on Arm drivers
  cpufreq: armada-8k: Avoid excessive stack usage
  cpufreq: omap: Drop asm includes
  cpufreq: qcom: Add explicit io.h include for readl/writel_relaxed
  cpufreq: spear: Use of_property_for_each_u32() instead of open coding
  cpufreq: Use of_property_present()
parents 222caf55 6b612d1b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -231,9 +231,7 @@ if X86
source "drivers/cpufreq/Kconfig.x86"
endif

if ARM || ARM64
source "drivers/cpufreq/Kconfig.arm"
endif

if PPC32 || PPC64
source "drivers/cpufreq/Kconfig.powerpc"
+30 −20
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM
	tristate "Allwinner nvmem based SUN50I CPUFreq driver"
	depends on ARCH_SUNXI
	depends on ARCH_SUNXI || COMPILE_TEST
	depends on NVMEM_SUNXI_SID
	select PM_OPP
	help
@@ -26,15 +26,17 @@ config ARM_APPLE_SOC_CPUFREQ

config ARM_ARMADA_37XX_CPUFREQ
	tristate "Armada 37xx CPUFreq support"
	depends on ARCH_MVEBU && CPUFREQ_DT
	depends on ARCH_MVEBU || COMPILE_TEST
	depends on CPUFREQ_DT
	help
	  This adds the CPUFreq driver support for Marvell Armada 37xx SoCs.
	  The Armada 37xx PMU supports 4 frequency and VDD levels.

config ARM_ARMADA_8K_CPUFREQ
	tristate "Armada 8K CPUFreq driver"
	depends on ARCH_MVEBU && CPUFREQ_DT
	select ARMADA_AP_CPU_CLK
	depends on ARCH_MVEBU || COMPILE_TEST
	depends on CPUFREQ_DT
	select ARMADA_AP_CPU_CLK if COMMON_CLK
	help
	  This enables the CPUFreq driver support for Marvell
	  Armada8k SOCs.
@@ -56,7 +58,7 @@ config ARM_SCPI_CPUFREQ
config ARM_VEXPRESS_SPC_CPUFREQ
	tristate "Versatile Express SPC based CPUfreq driver"
	depends on ARM_CPU_TOPOLOGY && HAVE_CLK
	depends on ARCH_VEXPRESS_SPC
	depends on ARCH_VEXPRESS_SPC || COMPILE_TEST
	select PM_OPP
	help
	  This add the CPUfreq driver support for Versatile Express
@@ -75,7 +77,8 @@ config ARM_BRCMSTB_AVS_CPUFREQ

config ARM_HIGHBANK_CPUFREQ
	tristate "Calxeda Highbank-based"
	depends on ARCH_HIGHBANK && CPUFREQ_DT && REGULATOR
	depends on ARCH_HIGHBANK || COMPILE_TEST
	depends on CPUFREQ_DT && REGULATOR && PL320_MBOX
	default m
	help
	  This adds the CPUFreq driver for Calxeda Highbank SoC
@@ -96,7 +99,8 @@ config ARM_IMX6Q_CPUFREQ

config ARM_IMX_CPUFREQ_DT
	tristate "Freescale i.MX8M cpufreq support"
	depends on ARCH_MXC && CPUFREQ_DT
	depends on CPUFREQ_DT
	depends on ARCH_MXC || COMPILE_TEST
	help
	  This adds cpufreq driver support for Freescale i.MX7/i.MX8M
	  series SoCs, based on cpufreq-dt.
@@ -111,7 +115,8 @@ config ARM_KIRKWOOD_CPUFREQ

config ARM_MEDIATEK_CPUFREQ
	tristate "CPU Frequency scaling support for MediaTek SoCs"
	depends on ARCH_MEDIATEK && REGULATOR
	depends on ARCH_MEDIATEK || COMPILE_TEST
	depends on REGULATOR
	select PM_OPP
	help
	  This adds the CPUFreq driver support for MediaTek SoCs.
@@ -130,12 +135,12 @@ config ARM_MEDIATEK_CPUFREQ_HW

config ARM_OMAP2PLUS_CPUFREQ
	bool "TI OMAP2+"
	depends on ARCH_OMAP2PLUS
	depends on ARCH_OMAP2PLUS || COMPILE_TEST
	default ARCH_OMAP2PLUS

config ARM_QCOM_CPUFREQ_NVMEM
	tristate "Qualcomm nvmem based CPUFreq"
	depends on ARCH_QCOM
	depends on ARCH_QCOM || COMPILE_TEST
	depends on NVMEM_QCOM_QFPROM
	depends on QCOM_SMEM
	select PM_OPP
@@ -166,7 +171,7 @@ config ARM_RASPBERRYPI_CPUFREQ

config ARM_S3C64XX_CPUFREQ
	bool "Samsung S3C64XX"
	depends on CPU_S3C6410
	depends on CPU_S3C6410 || COMPILE_TEST
	default y
	help
	  This adds the CPUFreq driver for Samsung S3C6410 SoC.
@@ -175,7 +180,7 @@ config ARM_S3C64XX_CPUFREQ

config ARM_S5PV210_CPUFREQ
	bool "Samsung S5PV210 and S5PC110"
	depends on CPU_S5PV210
	depends on CPU_S5PV210 || COMPILE_TEST
	default y
	help
	  This adds the CPUFreq driver for Samsung S5PV210 and
@@ -199,14 +204,15 @@ config ARM_SCMI_CPUFREQ

config ARM_SPEAR_CPUFREQ
	bool "SPEAr CPUFreq support"
	depends on PLAT_SPEAR
	depends on PLAT_SPEAR || COMPILE_TEST
	default y
	help
	  This adds the CPUFreq driver support for SPEAr SOCs.

config ARM_STI_CPUFREQ
	tristate "STi CPUFreq support"
	depends on CPUFREQ_DT && SOC_STIH407
	depends on CPUFREQ_DT
	depends on SOC_STIH407 || COMPILE_TEST
	help
	  This driver uses the generic OPP framework to match the running
	  platform with a predefined set of suitable values.  If not provided
@@ -216,34 +222,38 @@ config ARM_STI_CPUFREQ

config ARM_TEGRA20_CPUFREQ
	tristate "Tegra20/30 CPUFreq support"
	depends on ARCH_TEGRA && CPUFREQ_DT
	depends on ARCH_TEGRA || COMPILE_TEST
	depends on CPUFREQ_DT
	default y
	help
	  This adds the CPUFreq driver support for Tegra20/30 SOCs.

config ARM_TEGRA124_CPUFREQ
	bool "Tegra124 CPUFreq support"
	depends on ARCH_TEGRA && CPUFREQ_DT
	depends on ARCH_TEGRA || COMPILE_TEST
	depends on CPUFREQ_DT
	default y
	help
	  This adds the CPUFreq driver support for Tegra124 SOCs.

config ARM_TEGRA186_CPUFREQ
	tristate "Tegra186 CPUFreq support"
	depends on ARCH_TEGRA && TEGRA_BPMP
	depends on ARCH_TEGRA || COMPILE_TEST
	depends on TEGRA_BPMP
	help
	  This adds the CPUFreq driver support for Tegra186 SOCs.

config ARM_TEGRA194_CPUFREQ
	tristate "Tegra194 CPUFreq support"
	depends on ARCH_TEGRA_194_SOC && TEGRA_BPMP
	depends on ARCH_TEGRA_194_SOC || (64BIT && COMPILE_TEST)
	depends on TEGRA_BPMP
	default y
	help
	  This adds CPU frequency driver support for Tegra194 SOCs.

config ARM_TI_CPUFREQ
	bool "Texas Instruments CPUFreq support"
	depends on ARCH_OMAP2PLUS || ARCH_K3
	depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST
	default y
	help
	  This driver enables valid OPPs on the running platform based on
@@ -255,7 +265,7 @@ config ARM_TI_CPUFREQ

config ARM_PXA2xx_CPUFREQ
	tristate "Intel PXA2xx CPUfreq driver"
	depends on PXA27x || PXA25x
	depends on PXA27x || PXA25x || COMPILE_TEST
	help
	  This add the CPUFreq driver support for Intel PXA2xx SOCs.

+16 −3
Original line number Diff line number Diff line
@@ -554,12 +554,15 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
	}

	if (value == prev)
		return;
		goto cpufreq_policy_put;

	WRITE_ONCE(cpudata->cppc_req_cached, value);

	amd_pstate_update_perf(cpudata, min_perf, des_perf,
			       max_perf, fast_switch);

cpufreq_policy_put:
	cpufreq_cpu_put(policy);
}

static int amd_pstate_verify(struct cpufreq_policy_data *policy)
@@ -656,7 +659,12 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
	unsigned long max_perf, min_perf, des_perf,
		      cap_perf, lowest_nonlinear_perf;
	struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
	struct amd_cpudata *cpudata = policy->driver_data;
	struct amd_cpudata *cpudata;

	if (!policy)
		return;

	cpudata = policy->driver_data;

	if (policy->min != cpudata->min_limit_freq || policy->max != cpudata->max_limit_freq)
		amd_pstate_update_min_max_limit(policy);
@@ -870,11 +878,16 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
static void amd_pstate_update_limits(unsigned int cpu)
{
	struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
	struct amd_cpudata *cpudata = policy->driver_data;
	struct amd_cpudata *cpudata;
	u32 prev_high = 0, cur_high = 0;
	int ret;
	bool highest_perf_changed = false;

	if (!policy)
		return;

	cpudata = policy->driver_data;

	mutex_lock(&amd_pstate_driver_lock);
	if ((!amd_pstate_prefcore) || (!cpudata->hw_prefcore))
		goto free_cpufreq_put;
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ static const struct apple_soc_cpufreq_info soc_default_info = {
	.cur_pstate_mask = 0, /* fallback */
};

static const struct of_device_id apple_soc_cpufreq_of_match[] = {
static const struct of_device_id apple_soc_cpufreq_of_match[] __maybe_unused = {
	{
		.compatible = "apple,t8103-cluster-cpufreq",
		.data = &soc_t8103_info,
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static int __init armada_8k_cpufreq_init(void)
	int ret = 0, opps_index = 0, cpu, nb_cpus;
	struct freq_table *freq_tables;
	struct device_node *node;
	struct cpumask cpus;
	static struct cpumask cpus;

	node = of_find_matching_node_and_match(NULL, armada_8k_cpufreq_of_match,
					       NULL);
Loading