Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Merge branch 'pm-cpufreq'

* pm-cpufreq: (48 commits)
  cpufreq: kryo: Release OPP tables on module removal
  cpufreq: ap806: add missing of_node_put after of_device_is_available
  cpufreq: acpi-cpufreq: Report if CPU doesn't support boost technologies
  cpufreq: Pass updated policy to driver ->setpolicy() callback
  cpufreq: Fix two debug messages in cpufreq_set_policy()
  cpufreq: Reorder and simplify cpufreq_update_policy()
  cpufreq: Add kerneldoc comments for two core functions
  cpufreq: intel_pstate: Rework iowait boosting to be less aggressive
  cpufreq: intel_pstate: Eliminate intel_pstate_get_base_pstate()
  cpufreq: intel_pstate: Avoid redundant initialization of local vars
  cpufreq / cppc: Work around for Hisilicon CPPC cpufreq
  ACPI / CPPC: Add a helper to get desired performance
  cpufreq: davinci: move configuration to include/linux/platform_data
  cpufreq: speedstep: convert BUG() to BUG_ON()
  cpufreq: powernv: fix missing check of return value in init_powernv_pstates()
  cpufreq: longhaul: remove unneeded semicolon
  cpufreq: pcc-cpufreq: remove unneeded semicolon
  cpufreq: Replace double NOT (!!) with single NOT (!)
  cpufreq: intel_pstate: Add reasons for failure and debug messages
  cpufreq: dt: Implement online/offline() callbacks
  ...
parents 08a2e45a 185a23b6
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1737,6 +1737,7 @@ F: arch/arm/configs/mvebu_*_defconfig
F:	arch/arm/mach-mvebu/
F:	arch/arm64/boot/dts/marvell/armada*
F:	drivers/cpufreq/armada-37xx-cpufreq.c
F:	drivers/cpufreq/armada-8k-cpufreq.c
F:	drivers/cpufreq/mvebu-cpufreq.c
F:	drivers/irqchip/irq-armada-370-xp.c
F:	drivers/irqchip/irq-mvebu-*
@@ -3961,7 +3962,7 @@ M: Viresh Kumar <viresh.kumar@linaro.org>
L:	linux-pm@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
T:	git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git (For ARM Updates)
B:	https://bugzilla.kernel.org
F:	Documentation/admin-guide/pm/cpufreq.rst
F:	Documentation/admin-guide/pm/intel_pstate.rst
@@ -12605,7 +12606,7 @@ F: Documentation/media/v4l-drivers/qcom_camss.rst
F:	drivers/media/platform/qcom/camss/

QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
M:  Ilia Lin <ilia.lin@gmail.com>
M:	Ilia Lin <ilia.lin@kernel.org>
L:	linux-pm@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
+1 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/mfd/da8xx-cfgchip.h>
#include <linux/platform_data/clk-da8xx-cfgchip.h>
#include <linux/platform_data/clk-davinci-pll.h>
#include <linux/platform_data/davinci-cpufreq.h>
#include <linux/platform_data/gpio-davinci.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
@@ -29,7 +30,6 @@
#include <asm/mach/map.h>

#include <mach/common.h>
#include <mach/cpufreq.h>
#include <mach/cputype.h>
#include <mach/da8xx.h>
#include <mach/irqs.h>
+42 −0
Original line number Diff line number Diff line
@@ -1050,6 +1050,48 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
	return ret_val;
}

/**
 * cppc_get_desired_perf - Get the value of desired performance register.
 * @cpunum: CPU from which to get desired performance.
 * @desired_perf: address of a variable to store the returned desired performance
 *
 * Return: 0 for success, -EIO otherwise.
 */
int cppc_get_desired_perf(int cpunum, u64 *desired_perf)
{
	struct cpc_desc *cpc_desc = per_cpu(cpc_desc_ptr, cpunum);
	int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum);
	struct cpc_register_resource *desired_reg;
	struct cppc_pcc_data *pcc_ss_data = NULL;

	desired_reg = &cpc_desc->cpc_regs[DESIRED_PERF];

	if (CPC_IN_PCC(desired_reg)) {
		int ret = 0;

		if (pcc_ss_id < 0)
			return -EIO;

		pcc_ss_data = pcc_data[pcc_ss_id];

		down_write(&pcc_ss_data->pcc_lock);

		if (send_pcc_cmd(pcc_ss_id, CMD_READ) >= 0)
			cpc_read(cpunum, desired_reg, desired_perf);
		else
			ret = -EIO;

		up_write(&pcc_ss_data->pcc_lock);

		return ret;
	}

	cpc_read(cpunum, desired_reg, desired_perf);

	return 0;
}
EXPORT_SYMBOL_GPL(cppc_get_desired_perf);

/**
 * cppc_get_perf_caps - Get a CPUs performance capabilities.
 * @cpunum: CPU from which to get capabilities info.
+0 −3
Original line number Diff line number Diff line
@@ -207,8 +207,6 @@ comment "CPU frequency scaling drivers"
config CPUFREQ_DT
	tristate "Generic DT based cpufreq driver"
	depends on HAVE_CLK && OF
	# if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
	depends on !CPU_THERMAL || THERMAL
	select CPUFREQ_DT_PLATDEV
	select PM_OPP
	help
@@ -327,7 +325,6 @@ endif
config QORIQ_CPUFREQ
	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
	depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
	depends on !CPU_THERMAL || THERMAL
	select CLK_QORIQ
	help
	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
+11 −5
Original line number Diff line number Diff line
@@ -25,12 +25,21 @@ config ARM_ARMADA_37XX_CPUFREQ
	  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
	help
	  This enables the CPUFreq driver support for Marvell
	  Armada8k SOCs.
	  Armada8K device has the AP806 which supports scaling
	  to any full integer divider.

	  If in doubt, say N.

# big LITTLE core layer and glue drivers
config ARM_BIG_LITTLE_CPUFREQ
	tristate "Generic ARM big LITTLE CPUfreq driver"
	depends on ARM_CPU_TOPOLOGY && HAVE_CLK
	# if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y
	depends on !CPU_THERMAL || THERMAL
	select PM_OPP
	help
	  This enables the Generic CPUfreq driver for ARM big.LITTLE platforms.
@@ -38,7 +47,6 @@ config ARM_BIG_LITTLE_CPUFREQ
config ARM_SCPI_CPUFREQ
	tristate "SCPI based CPUfreq driver"
	depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
	depends on !CPU_THERMAL || THERMAL
	help
	  This adds the CPUfreq driver support for ARM platforms using SCPI
	  protocol for CPU power management.
@@ -93,7 +101,6 @@ config ARM_KIRKWOOD_CPUFREQ
config ARM_MEDIATEK_CPUFREQ
	tristate "CPU Frequency scaling support for MediaTek SoCs"
	depends on ARCH_MEDIATEK && REGULATOR
	depends on !CPU_THERMAL || THERMAL
	select PM_OPP
	help
	  This adds the CPUFreq driver support for MediaTek SoCs.
@@ -233,7 +240,6 @@ config ARM_SA1110_CPUFREQ
config ARM_SCMI_CPUFREQ
	tristate "SCMI based CPUfreq driver"
	depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
	depends on !CPU_THERMAL || THERMAL
	select PM_OPP
	help
	  This adds the CPUfreq driver support for ARM platforms using SCMI
Loading