Skip to content

Commit 17162a1

Browse files
committed
Merge back earlier cpufreq material for v5.1.
2 parents 8cbd468 + 1222d52 commit 17162a1

36 files changed

+778
-301
lines changed

MAINTAINERS

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@ F: arch/arm/configs/mvebu_*_defconfig
17371737
F: arch/arm/mach-mvebu/
17381738
F: arch/arm64/boot/dts/marvell/armada*
17391739
F: drivers/cpufreq/armada-37xx-cpufreq.c
1740+
F: drivers/cpufreq/armada-8k-cpufreq.c
17401741
F: drivers/cpufreq/mvebu-cpufreq.c
17411742
F: drivers/irqchip/irq-armada-370-xp.c
17421743
F: drivers/irqchip/irq-mvebu-*
@@ -3961,7 +3962,7 @@ M: Viresh Kumar <viresh.kumar@linaro.org>
39613962
L: linux-pm@vger.kernel.org
39623963
S: Maintained
39633964
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
3964-
T: git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
3965+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git (For ARM Updates)
39653966
B: https://bugzilla.kernel.org
39663967
F: Documentation/admin-guide/pm/cpufreq.rst
39673968
F: Documentation/admin-guide/pm/intel_pstate.rst
@@ -12604,11 +12605,11 @@ F: Documentation/media/v4l-drivers/qcom_camss.rst
1260412605
F: drivers/media/platform/qcom/camss/
1260512606

1260612607
QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
12607-
M: Ilia Lin <ilia.lin@gmail.com>
12608-
L: linux-pm@vger.kernel.org
12609-
S: Maintained
12610-
F: Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
12611-
F: drivers/cpufreq/qcom-cpufreq-kryo.c
12608+
M: Ilia Lin <ilia.lin@kernel.org>
12609+
L: linux-pm@vger.kernel.org
12610+
S: Maintained
12611+
F: Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
12612+
F: drivers/cpufreq/qcom-cpufreq-kryo.c
1261212613

1261312614
QUALCOMM EMAC GIGABIT ETHERNET DRIVER
1261412615
M: Timur Tabi <timur@kernel.org>

arch/arm/mach-davinci/da850.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/mfd/da8xx-cfgchip.h>
2222
#include <linux/platform_data/clk-da8xx-cfgchip.h>
2323
#include <linux/platform_data/clk-davinci-pll.h>
24+
#include <linux/platform_data/davinci-cpufreq.h>
2425
#include <linux/platform_data/gpio-davinci.h>
2526
#include <linux/platform_device.h>
2627
#include <linux/regmap.h>
@@ -29,7 +30,6 @@
2930
#include <asm/mach/map.h>
3031

3132
#include <mach/common.h>
32-
#include <mach/cpufreq.h>
3333
#include <mach/cputype.h>
3434
#include <mach/da8xx.h>
3535
#include <mach/irqs.h>

arch/arm/mach-davinci/include/mach/cpufreq.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

drivers/acpi/cppc_acpi.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,48 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
10501050
return ret_val;
10511051
}
10521052

1053+
/**
1054+
* cppc_get_desired_perf - Get the value of desired performance register.
1055+
* @cpunum: CPU from which to get desired performance.
1056+
* @desired_perf: address of a variable to store the returned desired performance
1057+
*
1058+
* Return: 0 for success, -EIO otherwise.
1059+
*/
1060+
int cppc_get_desired_perf(int cpunum, u64 *desired_perf)
1061+
{
1062+
struct cpc_desc *cpc_desc = per_cpu(cpc_desc_ptr, cpunum);
1063+
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum);
1064+
struct cpc_register_resource *desired_reg;
1065+
struct cppc_pcc_data *pcc_ss_data = NULL;
1066+
1067+
desired_reg = &cpc_desc->cpc_regs[DESIRED_PERF];
1068+
1069+
if (CPC_IN_PCC(desired_reg)) {
1070+
int ret = 0;
1071+
1072+
if (pcc_ss_id < 0)
1073+
return -EIO;
1074+
1075+
pcc_ss_data = pcc_data[pcc_ss_id];
1076+
1077+
down_write(&pcc_ss_data->pcc_lock);
1078+
1079+
if (send_pcc_cmd(pcc_ss_id, CMD_READ) >= 0)
1080+
cpc_read(cpunum, desired_reg, desired_perf);
1081+
else
1082+
ret = -EIO;
1083+
1084+
up_write(&pcc_ss_data->pcc_lock);
1085+
1086+
return ret;
1087+
}
1088+
1089+
cpc_read(cpunum, desired_reg, desired_perf);
1090+
1091+
return 0;
1092+
}
1093+
EXPORT_SYMBOL_GPL(cppc_get_desired_perf);
1094+
10531095
/**
10541096
* cppc_get_perf_caps - Get a CPUs performance capabilities.
10551097
* @cpunum: CPU from which to get capabilities info.

drivers/cpufreq/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ comment "CPU frequency scaling drivers"
207207
config CPUFREQ_DT
208208
tristate "Generic DT based cpufreq driver"
209209
depends on HAVE_CLK && OF
210-
# if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
211-
depends on !CPU_THERMAL || THERMAL
212210
select CPUFREQ_DT_PLATDEV
213211
select PM_OPP
214212
help
@@ -327,7 +325,6 @@ endif
327325
config QORIQ_CPUFREQ
328326
tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
329327
depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
330-
depends on !CPU_THERMAL || THERMAL
331328
select CLK_QORIQ
332329
help
333330
This adds the CPUFreq driver support for Freescale QorIQ SoCs

drivers/cpufreq/Kconfig.arm

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,28 @@ config ARM_ARMADA_37XX_CPUFREQ
2525
This adds the CPUFreq driver support for Marvell Armada 37xx SoCs.
2626
The Armada 37xx PMU supports 4 frequency and VDD levels.
2727

28+
config ARM_ARMADA_8K_CPUFREQ
29+
tristate "Armada 8K CPUFreq driver"
30+
depends on ARCH_MVEBU && CPUFREQ_DT
31+
help
32+
This enables the CPUFreq driver support for Marvell
33+
Armada8k SOCs.
34+
Armada8K device has the AP806 which supports scaling
35+
to any full integer divider.
36+
37+
If in doubt, say N.
38+
2839
# big LITTLE core layer and glue drivers
2940
config ARM_BIG_LITTLE_CPUFREQ
3041
tristate "Generic ARM big LITTLE CPUfreq driver"
3142
depends on ARM_CPU_TOPOLOGY && HAVE_CLK
32-
# if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y
33-
depends on !CPU_THERMAL || THERMAL
3443
select PM_OPP
3544
help
3645
This enables the Generic CPUfreq driver for ARM big.LITTLE platforms.
3746

3847
config ARM_SCPI_CPUFREQ
3948
tristate "SCPI based CPUfreq driver"
4049
depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
41-
depends on !CPU_THERMAL || THERMAL
4250
help
4351
This adds the CPUfreq driver support for ARM platforms using SCPI
4452
protocol for CPU power management.
@@ -93,7 +101,6 @@ config ARM_KIRKWOOD_CPUFREQ
93101
config ARM_MEDIATEK_CPUFREQ
94102
tristate "CPU Frequency scaling support for MediaTek SoCs"
95103
depends on ARCH_MEDIATEK && REGULATOR
96-
depends on !CPU_THERMAL || THERMAL
97104
select PM_OPP
98105
help
99106
This adds the CPUFreq driver support for MediaTek SoCs.
@@ -233,7 +240,6 @@ config ARM_SA1110_CPUFREQ
233240
config ARM_SCMI_CPUFREQ
234241
tristate "SCMI based CPUfreq driver"
235242
depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
236-
depends on !CPU_THERMAL || THERMAL
237243
select PM_OPP
238244
help
239245
This adds the CPUfreq driver support for ARM platforms using SCMI

drivers/cpufreq/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ obj-$(CONFIG_X86_SFI_CPUFREQ) += sfi-cpufreq.o
5050
obj-$(CONFIG_ARM_BIG_LITTLE_CPUFREQ) += arm_big_little.o
5151

5252
obj-$(CONFIG_ARM_ARMADA_37XX_CPUFREQ) += armada-37xx-cpufreq.o
53+
obj-$(CONFIG_ARM_ARMADA_8K_CPUFREQ) += armada-8k-cpufreq.o
5354
obj-$(CONFIG_ARM_BRCMSTB_AVS_CPUFREQ) += brcmstb-avs-cpufreq.o
5455
obj-$(CONFIG_ACPI_CPPC_CPUFREQ) += cppc_cpufreq.o
5556
obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o

drivers/cpufreq/acpi-cpufreq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,10 @@ static void __init acpi_cpufreq_boost_init(void)
916916
{
917917
int ret;
918918

919-
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)))
919+
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
920+
pr_debug("Boost capabilities not present in the processor\n");
920921
return;
922+
}
921923

922924
acpi_cpufreq_driver.set_boost = set_boost;
923925
acpi_cpufreq_driver.boost_enabled = boost_state(0);

0 commit comments

Comments
 (0)