You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'pm-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
"Traditionally, cpufreq is the area with the greatest number of
changes, but there are fewer of them than last time. There also is
some activity in the generic power domains and the devfreq frameworks,
a couple of system suspend and hibernation fixes and some assorted
changes in other places.
One new feature is the cpufreq change to allow the scheduler to pass
hints to the governors' utilization update callbacks and some code
rework based on that. Another one is the support for domain removal in
the generic power domains framework. Also it is now possible to use
hibernation with PAGE_POISONING_ZERO enabled and devfreq supports the
RockChip DFI controller and the rk3399 DMC.
The rest of the changes is mostly fixes and cleanups in a number of
places.
Specifics:
- Add a mechanism for passing hints from the scheduler to cpufreq
governors via their utilization update callbacks and use it to
introduce "IOwait boosting" into the schedutil governor and
intel_pstate that will make them boost performance if the enqueued
task was previously waiting on I/O (Rafael Wysocki).
- Fix a schedutil governor problem that causes it to overestimate
utilization if SMT is in use (Steve Muckle).
- Update defconfigs trying to use the schedutil governor as a module
which is not possible any more (Javier Martinez Canillas).
- Update the intel_pstate's pstate_sample tracepoint to take "IOwait
boosting" into account (Srinivas Pandruvada).
- Fix a problem in the cpufreq core causing it to mishandle the
initialization of CPUs registered after the cpufreq driver (Viresh
Kumar, Rafael Wysocki).
- Make the cpufreq-dt driver support per-policy governor tunables,
clean it up and update its Kconfig description (Viresh Kumar).
- Add support for more ARM platforms to the cpufreq-dt driver
(Chanwoo Choi, Dave Gerlach, Geert Uytterhoeven).
- Make the cpufreq CPPC driver report frequencies in KHz to avoid
user space compatiblility issues (Al Stone, Hoan Tran).
- Clean up a few cpufreq drivers (st, kirkwood, SCPI) a bit (Colin
Ian King, Markus Elfring).
- Constify some local structures in the intel_pstate driver (Julia
Lawall).
- Add a Documentation/cpu-freq/ entry to MAINTAINERS (Jean Delvare).
- Add support for PM domain removal to the generic power domains
(genpd) framework, add new DT helper functions to it and make it
always enable debugfs support if available (Jon Hunter, Tomeu
Vizoso).
- Clean up the generic power domains (genpd) framework and make it
avoid measuring power-on and power-off latencies during system-wide
PM transitions (Ulf Hansson).
- Add support for the RockChip DFI controller and the rk3399 DMC to
the devfreq framework (Lin Huang, Axel Lin, Arnd Bergmann).
- Add COMPILE_TEST to the devfreq framework (Krzysztof Kozlowski,
Stephen Rothwell).
- Fix a minor issue in the exynos-ppmu devfreq driver and fix up
devfreq Kconfig indentation style (Wei Yongjun, Jisheng Zhang).
- Fix the system suspend interface to make suspend-to-idle work if
platform suspend operations have not been registered (Sudeep
Holla).
- Make it possible to use hibernation with PAGE_POISONING_ZERO
enabled (Anisse Astier).
- Increas the default timeout of the system suspend/resume watchdog
and make it depend on EXPERT (Chen Yu).
- Make the operating performance points (OPP) framework avoid using
OPPs that aren't supported by the platform and fix a build warning
in it (Dave Gerlach, Arnd Bergmann).
- Fix the ARM cpuidle driver's return value (Christophe Jaillet).
- Make the SmartReflex AVS (Adaptive Voltage Scaling) driver use more
common logging style (Joe Perches)"
* tag 'pm-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (58 commits)
PM / OPP: Don't support OPP if it provides supported-hw but platform does not
cpufreq: st: add missing \n to end of dev_err message
cpufreq: kirkwood: add missing \n to end of dev_err messages
PM / Domains: Rename pm_genpd_sync_poweron|poweroff()
PM / Domains: Don't measure latency of ->power_on|off() during system PM
PM / Domains: Remove redundant system PM callbacks
PM / Domains: Simplify detaching a device from its genpd
PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove
PM / devfreq: rockchip: add PM_DEVFREQ_EVENT dependency
PM / OPP: avoid maybe-uninitialized warning
PM / Domains: Allow holes in genpd_data.domains array
cpufreq: CPPC: Avoid overflow when calculating desired_perf
cpufreq: ti: Use generic platdev driver
cpufreq: intel_pstate: Add io_boost trace
partial revert of "PM / devfreq: Add COMPILE_TEST for build coverage"
cpufreq: intel_pstate: Use IOWAIT flag in Atom algorithm
cpufreq: schedutil: Add iowait boosting
cpufreq / sched: SCHED_CPUFREQ_IOWAIT flag to indicate iowait condition
PM / Domains: Add support for removing nested PM domains by provider
PM / Domains: Add support for removing PM domains
...
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
|
||||
* Rockchip rk3399 DFI device
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "rockchip,rk3399-dfi".
|
||||
- reg: physical base address of each DFI and length of memory mapped region
|
||||
- rockchip,pmu: phandle to the syscon managing the "pmu general register files"
|
||||
- clocks: phandles for clock specified in "clock-names" property
|
||||
- clock-names : the name of clock used by the DFI, must be "pclk_ddr_mon";
|
||||
|
||||
Example:
|
||||
dfi: dfi@0xff630000 {
|
||||
compatible = "rockchip,rk3399-dfi";
|
||||
reg = <0x00 0xff630000 0x00 0x4000>;
|
||||
rockchip,pmu = <&pmugrf>;
|
||||
clocks = <&cru PCLK_DDR_MON>;
|
||||
clock-names = "pclk_ddr_mon";
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,209 @@
|
||||
* Rockchip rk3399 DMC(Dynamic Memory Controller) device
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "rockchip,rk3399-dmc".
|
||||
- devfreq-events: Node to get DDR loading, Refer to
|
||||
Documentation/devicetree/bindings/devfreq/
|
||||
rockchip-dfi.txt
|
||||
- interrupts: The interrupt number to the CPU. The interrupt
|
||||
specifier format depends on the interrupt controller.
|
||||
It should be DCF interrupts, when DDR dvfs finish,
|
||||
it will happen.
|
||||
- clocks: Phandles for clock specified in "clock-names" property
|
||||
- clock-names : The name of clock used by the DFI, must be
|
||||
"pclk_ddr_mon";
|
||||
- operating-points-v2: Refer to Documentation/devicetree/bindings/power/opp.txt
|
||||
for details.
|
||||
- center-supply: DMC supply node.
|
||||
- status: Marks the node enabled/disabled.
|
||||
|
||||
Following properties are ddr timing:
|
||||
|
||||
- rockchip,dram_speed_bin : Value reference include/dt-bindings/clock/ddr.h,
|
||||
it select ddr3 cl-trp-trcd type, default value
|
||||
"DDR3_DEFAULT".it must selected according to
|
||||
"Speed Bin" in ddr3 datasheet, DO NOT use
|
||||
smaller "Speed Bin" than ddr3 exactly is.
|
||||
|
||||
- rockchip,pd_idle : Config the PD_IDLE value, defined the power-down
|
||||
idle period, memories are places into power-down
|
||||
mode if bus is idle for PD_IDLE DFI clocks.
|
||||
|
||||
- rockchip,sr_idle : Configure the SR_IDLE value, defined the
|
||||
selfrefresh idle period, memories are places
|
||||
into self-refresh mode if bus is idle for
|
||||
SR_IDLE*1024 DFI clocks (DFI clocks freq is
|
||||
half of dram's clocks), defaule value is "0".
|
||||
|
||||
- rockchip,sr_mc_gate_idle : Defined the self-refresh with memory and
|
||||
controller clock gating idle period, memories
|
||||
are places into self-refresh mode and memory
|
||||
controller clock arg gating if bus is idle for
|
||||
sr_mc_gate_idle*1024 DFI clocks.
|
||||
|
||||
- rockchip,srpd_lite_idle : Defined the self-refresh power down idle
|
||||
period, memories are places into self-refresh
|
||||
power down mode if bus is idle for
|
||||
srpd_lite_idle*1024 DFI clocks. This parameter
|
||||
is for LPDDR4 only.
|
||||
|
||||
- rockchip,standby_idle : Defined the standby idle period, memories are
|
||||
places into self-refresh than controller, pi,
|
||||
phy and dram clock will gating if bus is idle
|
||||
for standby_idle * DFI clocks.
|
||||
|
||||
- rockchip,dram_dll_disb_freq : It's defined the DDR3 dll bypass frequency in
|
||||
MHz, when ddr freq less than DRAM_DLL_DISB_FREQ,
|
||||
ddr3 dll will bypssed note: if dll was bypassed,
|
||||
the odt also stop working.
|
||||
|
||||
- rockchip,phy_dll_disb_freq : Defined the PHY dll bypass frequency in
|
||||
MHz (Mega Hz), when ddr freq less than
|
||||
DRAM_DLL_DISB_FREQ, phy dll will bypssed.
|
||||
note: phy dll and phy odt are independent.
|
||||
|
||||
- rockchip,ddr3_odt_disb_freq : When dram type is DDR3, this parameter defined
|
||||
the odt disable frequency in MHz (Mega Hz),
|
||||
when ddr frequency less then ddr3_odt_disb_freq,
|
||||
the odt on dram side and controller side are
|
||||
both disabled.
|
||||
|
||||
- rockchip,ddr3_drv : When dram type is DDR3, this parameter define
|
||||
the dram side driver stength in ohm, default
|
||||
value is DDR3_DS_40ohm.
|
||||
|
||||
- rockchip,ddr3_odt : When dram type is DDR3, this parameter define
|
||||
the dram side ODT stength in ohm, default value
|
||||
is DDR3_ODT_120ohm.
|
||||
|
||||
- rockchip,phy_ddr3_ca_drv : When dram type is DDR3, this parameter define
|
||||
the phy side CA line(incluing command line,
|
||||
address line and clock line) driver strength.
|
||||
Default value is PHY_DRV_ODT_40.
|
||||
|
||||
- rockchip,phy_ddr3_dq_drv : When dram type is DDR3, this parameter define
|
||||
the phy side DQ line(incluing DQS/DQ/DM line)
|
||||
driver strength. default value is PHY_DRV_ODT_40.
|
||||
|
||||
- rockchip,phy_ddr3_odt : When dram type is DDR3, this parameter define the
|
||||
phy side odt strength, default value is
|
||||
PHY_DRV_ODT_240.
|
||||
|
||||
- rockchip,lpddr3_odt_disb_freq : When dram type is LPDDR3, this parameter defined
|
||||
then odt disable frequency in MHz (Mega Hz),
|
||||
when ddr frequency less then ddr3_odt_disb_freq,
|
||||
the odt on dram side and controller side are
|
||||
both disabled.
|
||||
|
||||
- rockchip,lpddr3_drv : When dram type is LPDDR3, this parameter define
|
||||
the dram side driver stength in ohm, default
|
||||
value is LP3_DS_34ohm.
|
||||
|
||||
- rockchip,lpddr3_odt : When dram type is LPDDR3, this parameter define
|
||||
the dram side ODT stength in ohm, default value
|
||||
is LP3_ODT_240ohm.
|
||||
|
||||
- rockchip,phy_lpddr3_ca_drv : When dram type is LPDDR3, this parameter define
|
||||
the phy side CA line(incluing command line,
|
||||
address line and clock line) driver strength.
|
||||
default value is PHY_DRV_ODT_40.
|
||||
|
||||
- rockchip,phy_lpddr3_dq_drv : When dram type is LPDDR3, this parameter define
|
||||
the phy side DQ line(incluing DQS/DQ/DM line)
|
||||
driver strength. default value is
|
||||
PHY_DRV_ODT_40.
|
||||
|
||||
- rockchip,phy_lpddr3_odt : When dram type is LPDDR3, this parameter define
|
||||
the phy side odt strength, default value is
|
||||
PHY_DRV_ODT_240.
|
||||
|
||||
- rockchip,lpddr4_odt_disb_freq : When dram type is LPDDR4, this parameter
|
||||
defined the odt disable frequency in
|
||||
MHz (Mega Hz), when ddr frequency less then
|
||||
ddr3_odt_disb_freq, the odt on dram side and
|
||||
controller side are both disabled.
|
||||
|
||||
- rockchip,lpddr4_drv : When dram type is LPDDR4, this parameter define
|
||||
the dram side driver stength in ohm, default
|
||||
value is LP4_PDDS_60ohm.
|
||||
|
||||
- rockchip,lpddr4_dq_odt : When dram type is LPDDR4, this parameter define
|
||||
the dram side ODT on dqs/dq line stength in ohm,
|
||||
default value is LP4_DQ_ODT_40ohm.
|
||||
|
||||
- rockchip,lpddr4_ca_odt : When dram type is LPDDR4, this parameter define
|
||||
the dram side ODT on ca line stength in ohm,
|
||||
default value is LP4_CA_ODT_40ohm.
|
||||
|
||||
- rockchip,phy_lpddr4_ca_drv : When dram type is LPDDR4, this parameter define
|
||||
the phy side CA line(incluing command address
|
||||
line) driver strength. default value is
|
||||
PHY_DRV_ODT_40.
|
||||
|
||||
- rockchip,phy_lpddr4_ck_cs_drv : When dram type is LPDDR4, this parameter define
|
||||
the phy side clock line and cs line driver
|
||||
strength. default value is PHY_DRV_ODT_80.
|
||||
|
||||
- rockchip,phy_lpddr4_dq_drv : When dram type is LPDDR4, this parameter define
|
||||
the phy side DQ line(incluing DQS/DQ/DM line)
|
||||
driver strength. default value is PHY_DRV_ODT_80.
|
||||
|
||||
- rockchip,phy_lpddr4_odt : When dram type is LPDDR4, this parameter define
|
||||
the phy side odt strength, default value is
|
||||
PHY_DRV_ODT_60.
|
||||
|
||||
Example:
|
||||
dmc_opp_table: dmc_opp_table {
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
opp00 {
|
||||
opp-hz = /bits/ 64 <300000000>;
|
||||
opp-microvolt = <900000>;
|
||||
};
|
||||
opp01 {
|
||||
opp-hz = /bits/ 64 <666000000>;
|
||||
opp-microvolt = <900000>;
|
||||
};
|
||||
};
|
||||
|
||||
dmc: dmc {
|
||||
compatible = "rockchip,rk3399-dmc";
|
||||
devfreq-events = <&dfi>;
|
||||
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru SCLK_DDRCLK>;
|
||||
clock-names = "dmc_clk";
|
||||
operating-points-v2 = <&dmc_opp_table>;
|
||||
center-supply = <&ppvar_centerlogic>;
|
||||
upthreshold = <15>;
|
||||
downdifferential = <10>;
|
||||
rockchip,ddr3_speed_bin = <21>;
|
||||
rockchip,pd_idle = <0x40>;
|
||||
rockchip,sr_idle = <0x2>;
|
||||
rockchip,sr_mc_gate_idle = <0x3>;
|
||||
rockchip,srpd_lite_idle = <0x4>;
|
||||
rockchip,standby_idle = <0x2000>;
|
||||
rockchip,dram_dll_dis_freq = <300>;
|
||||
rockchip,phy_dll_dis_freq = <125>;
|
||||
rockchip,auto_pd_dis_freq = <666>;
|
||||
rockchip,ddr3_odt_dis_freq = <333>;
|
||||
rockchip,ddr3_drv = <DDR3_DS_40ohm>;
|
||||
rockchip,ddr3_odt = <DDR3_ODT_120ohm>;
|
||||
rockchip,phy_ddr3_ca_drv = <PHY_DRV_ODT_40>;
|
||||
rockchip,phy_ddr3_dq_drv = <PHY_DRV_ODT_40>;
|
||||
rockchip,phy_ddr3_odt = <PHY_DRV_ODT_240>;
|
||||
rockchip,lpddr3_odt_dis_freq = <333>;
|
||||
rockchip,lpddr3_drv = <LP3_DS_34ohm>;
|
||||
rockchip,lpddr3_odt = <LP3_ODT_240ohm>;
|
||||
rockchip,phy_lpddr3_ca_drv = <PHY_DRV_ODT_40>;
|
||||
rockchip,phy_lpddr3_dq_drv = <PHY_DRV_ODT_40>;
|
||||
rockchip,phy_lpddr3_odt = <PHY_DRV_ODT_240>;
|
||||
rockchip,lpddr4_odt_dis_freq = <333>;
|
||||
rockchip,lpddr4_drv = <LP4_PDDS_60ohm>;
|
||||
rockchip,lpddr4_dq_odt = <LP4_DQ_ODT_40ohm>;
|
||||
rockchip,lpddr4_ca_odt = <LP4_CA_ODT_40ohm>;
|
||||
rockchip,phy_lpddr4_ca_drv = <PHY_DRV_ODT_40>;
|
||||
rockchip,phy_lpddr4_ck_cs_drv = <PHY_DRV_ODT_80>;
|
||||
rockchip,phy_lpddr4_dq_drv = <PHY_DRV_ODT_80>;
|
||||
rockchip,phy_lpddr4_odt = <PHY_DRV_ODT_60>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -3284,6 +3284,7 @@ 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)
|
||||
F: Documentation/cpu-freq/
|
||||
F: drivers/cpufreq/
|
||||
F: include/linux/cpufreq.h
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=m
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=m
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_ARM_EXYNOS_CPUIDLE=y
|
||||
|
||||
@@ -135,7 +135,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=m
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=m
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
CONFIG_QORIQ_CPUFREQ=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
|
||||
+352
-78
File diff suppressed because it is too large
Load Diff
@@ -584,7 +584,6 @@ int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
|
||||
struct clk *clk;
|
||||
unsigned long freq, old_freq;
|
||||
unsigned long u_volt, u_volt_min, u_volt_max;
|
||||
unsigned long ou_volt, ou_volt_min, ou_volt_max;
|
||||
int ret;
|
||||
|
||||
if (unlikely(!target_freq)) {
|
||||
@@ -620,11 +619,7 @@ int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
|
||||
}
|
||||
|
||||
old_opp = _find_freq_ceil(opp_table, &old_freq);
|
||||
if (!IS_ERR(old_opp)) {
|
||||
ou_volt = old_opp->u_volt;
|
||||
ou_volt_min = old_opp->u_volt_min;
|
||||
ou_volt_max = old_opp->u_volt_max;
|
||||
} else {
|
||||
if (IS_ERR(old_opp)) {
|
||||
dev_err(dev, "%s: failed to find current OPP for freq %lu (%ld)\n",
|
||||
__func__, old_freq, PTR_ERR(old_opp));
|
||||
}
|
||||
@@ -683,7 +678,8 @@ restore_freq:
|
||||
restore_voltage:
|
||||
/* This shouldn't harm even if the voltages weren't updated earlier */
|
||||
if (!IS_ERR(old_opp))
|
||||
_set_opp_voltage(dev, reg, ou_volt, ou_volt_min, ou_volt_max);
|
||||
_set_opp_voltage(dev, reg, old_opp->u_volt,
|
||||
old_opp->u_volt_min, old_opp->u_volt_max);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -71,8 +71,18 @@ static bool _opp_is_supported(struct device *dev, struct opp_table *opp_table,
|
||||
u32 version;
|
||||
int ret;
|
||||
|
||||
if (!opp_table->supported_hw)
|
||||
return true;
|
||||
if (!opp_table->supported_hw) {
|
||||
/*
|
||||
* In the case that no supported_hw has been set by the
|
||||
* platform but there is an opp-supported-hw value set for
|
||||
* an OPP then the OPP should not be enabled as there is
|
||||
* no way to see if the hardware supports it.
|
||||
*/
|
||||
if (of_find_property(np, "opp-supported-hw", NULL))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
while (count--) {
|
||||
ret = of_property_read_u32_index(np, "opp-supported-hw", count,
|
||||
|
||||
@@ -194,7 +194,7 @@ config CPU_FREQ_GOV_CONSERVATIVE
|
||||
If in doubt, say N.
|
||||
|
||||
config CPU_FREQ_GOV_SCHEDUTIL
|
||||
tristate "'schedutil' cpufreq policy governor"
|
||||
bool "'schedutil' cpufreq policy governor"
|
||||
depends on CPU_FREQ && SMP
|
||||
select CPU_FREQ_GOV_ATTR_SET
|
||||
select IRQ_WORK
|
||||
@@ -208,9 +208,6 @@ config CPU_FREQ_GOV_SCHEDUTIL
|
||||
frequency tipping point is at utilization/capacity equal to 80% in
|
||||
both cases.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called cpufreq_schedutil.
|
||||
|
||||
If in doubt, say N.
|
||||
|
||||
comment "CPU frequency scaling drivers"
|
||||
@@ -225,7 +222,7 @@ config CPUFREQ_DT
|
||||
help
|
||||
This adds a generic DT based cpufreq driver for frequency management.
|
||||
It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
|
||||
systems which share clock and voltage across all CPUs.
|
||||
systems.
|
||||
|
||||
If in doubt, say N.
|
||||
|
||||
|
||||
@@ -19,10 +19,19 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include <acpi/cppc_acpi.h>
|
||||
|
||||
/* Minimum struct length needed for the DMI processor entry we want */
|
||||
#define DMI_ENTRY_PROCESSOR_MIN_LENGTH 48
|
||||
|
||||
/* Offest in the DMI processor structure for the max frequency */
|
||||
#define DMI_PROCESSOR_MAX_SPEED 0x14
|
||||
|
||||
/*
|
||||
* These structs contain information parsed from per CPU
|
||||
* ACPI _CPC structures.
|
||||
@@ -32,6 +41,39 @@
|
||||
*/
|
||||
static struct cpudata **all_cpu_data;
|
||||
|
||||
/* Capture the max KHz from DMI */
|
||||
static u64 cppc_dmi_max_khz;
|
||||
|
||||
/* Callback function used to retrieve the max frequency from DMI */
|
||||
static void cppc_find_dmi_mhz(const struct dmi_header *dm, void *private)
|
||||
{
|
||||
const u8 *dmi_data = (const u8 *)dm;
|
||||
u16 *mhz = (u16 *)private;
|
||||
|
||||
if (dm->type == DMI_ENTRY_PROCESSOR &&
|
||||
dm->length >= DMI_ENTRY_PROCESSOR_MIN_LENGTH) {
|
||||
u16 val = (u16)get_unaligned((const u16 *)
|
||||
(dmi_data + DMI_PROCESSOR_MAX_SPEED));
|
||||
*mhz = val > *mhz ? val : *mhz;
|
||||
}
|
||||
}
|
||||
|
||||
/* Look up the max frequency in DMI */
|
||||
static u64 cppc_get_dmi_max_khz(void)
|
||||
{
|
||||
u16 mhz = 0;
|
||||
|
||||
dmi_walk(cppc_find_dmi_mhz, &mhz);
|
||||
|
||||
/*
|
||||
* Real stupid fallback value, just in case there is no
|
||||
* actual value set.
|
||||
*/
|
||||
mhz = mhz ? mhz : 1;
|
||||
|
||||
return (1000 * mhz);
|
||||
}
|
||||
|
||||
static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
|
||||
unsigned int target_freq,
|
||||
unsigned int relation)
|
||||
@@ -42,7 +84,7 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
|
||||
|
||||
cpu = all_cpu_data[policy->cpu];
|
||||
|
||||
cpu->perf_ctrls.desired_perf = target_freq;
|
||||
cpu->perf_ctrls.desired_perf = (u64)target_freq * policy->max / cppc_dmi_max_khz;
|
||||
freqs.old = policy->cur;
|
||||
freqs.new = target_freq;
|
||||
|
||||
@@ -94,8 +136,10 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||
return ret;
|
||||
}
|
||||
|
||||
policy->min = cpu->perf_caps.lowest_perf;
|
||||
policy->max = cpu->perf_caps.highest_perf;
|
||||
cppc_dmi_max_khz = cppc_get_dmi_max_khz();
|
||||
|
||||
policy->min = cpu->perf_caps.lowest_perf * cppc_dmi_max_khz / cpu->perf_caps.highest_perf;
|
||||
policy->max = cppc_dmi_max_khz;
|
||||
policy->cpuinfo.min_freq = policy->min;
|
||||
policy->cpuinfo.max_freq = policy->max;
|
||||
policy->shared_type = cpu->shared_type;
|
||||
@@ -112,7 +156,8 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||
cpu->cur_policy = policy;
|
||||
|
||||
/* Set policy->cur to max now. The governors will adjust later. */
|
||||
policy->cur = cpu->perf_ctrls.desired_perf = cpu->perf_caps.highest_perf;
|
||||
policy->cur = cppc_dmi_max_khz;
|
||||
cpu->perf_ctrls.desired_perf = cpu->perf_caps.highest_perf;
|
||||
|
||||
ret = cppc_set_perf(cpu_num, &cpu->perf_ctrls);
|
||||
if (ret)
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "cpufreq-dt.h"
|
||||
|
||||
static const struct of_device_id machines[] __initconst = {
|
||||
{ .compatible = "allwinner,sun4i-a10", },
|
||||
{ .compatible = "allwinner,sun5i-a10s", },
|
||||
@@ -40,6 +42,7 @@ static const struct of_device_id machines[] __initconst = {
|
||||
{ .compatible = "samsung,exynos5250", },
|
||||
#ifndef CONFIG_BL_SWITCHER
|
||||
{ .compatible = "samsung,exynos5420", },
|
||||
{ .compatible = "samsung,exynos5433", },
|
||||
{ .compatible = "samsung,exynos5800", },
|
||||
#endif
|
||||
|
||||
@@ -51,6 +54,7 @@ static const struct of_device_id machines[] __initconst = {
|
||||
{ .compatible = "renesas,r8a7779", },
|
||||
{ .compatible = "renesas,r8a7790", },
|
||||
{ .compatible = "renesas,r8a7791", },
|
||||
{ .compatible = "renesas,r8a7792", },
|
||||
{ .compatible = "renesas,r8a7793", },
|
||||
{ .compatible = "renesas,r8a7794", },
|
||||
{ .compatible = "renesas,sh73a0", },
|
||||
@@ -68,6 +72,8 @@ static const struct of_device_id machines[] __initconst = {
|
||||
|
||||
{ .compatible = "sigma,tango4" },
|
||||
|
||||
{ .compatible = "ti,am33xx", },
|
||||
{ .compatible = "ti,dra7", },
|
||||
{ .compatible = "ti,omap2", },
|
||||
{ .compatible = "ti,omap3", },
|
||||
{ .compatible = "ti,omap4", },
|
||||
@@ -91,7 +97,8 @@ static int __init cpufreq_dt_platdev_init(void)
|
||||
if (!match)
|
||||
return -ENODEV;
|
||||
|
||||
return PTR_ERR_OR_ZERO(platform_device_register_simple("cpufreq-dt", -1,
|
||||
NULL, 0));
|
||||
return PTR_ERR_OR_ZERO(platform_device_register_data(NULL, "cpufreq-dt",
|
||||
-1, match->data,
|
||||
sizeof(struct cpufreq_dt_platform_data)));
|
||||
}
|
||||
device_initcall(cpufreq_dt_platdev_init);
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/thermal.h>
|
||||
|
||||
#include "cpufreq-dt.h"
|
||||
|
||||
struct private_data {
|
||||
struct device *cpu_dev;
|
||||
struct thermal_cooling_device *cdev;
|
||||
@@ -353,6 +355,7 @@ static struct cpufreq_driver dt_cpufreq_driver = {
|
||||
|
||||
static int dt_cpufreq_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct cpufreq_dt_platform_data *data = dev_get_platdata(&pdev->dev);
|
||||
int ret;
|
||||
|
||||
/*
|
||||
@@ -366,7 +369,8 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev);
|
||||
if (data && data->have_governor_per_policy)
|
||||
dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY;
|
||||
|
||||
ret = cpufreq_register_driver(&dt_cpufreq_driver);
|
||||
if (ret)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Linaro
|
||||
* Viresh Kumar <viresh.kumar@linaro.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __CPUFREQ_DT_H__
|
||||
#define __CPUFREQ_DT_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct cpufreq_dt_platform_data {
|
||||
bool have_governor_per_policy;
|
||||
};
|
||||
|
||||
#endif /* __CPUFREQ_DT_H__ */
|
||||
+28
-65
@@ -916,58 +916,18 @@ static struct kobj_type ktype_cpufreq = {
|
||||
.release = cpufreq_sysfs_release,
|
||||
};
|
||||
|
||||
static int add_cpu_dev_symlink(struct cpufreq_policy *policy, int cpu)
|
||||
static int add_cpu_dev_symlink(struct cpufreq_policy *policy,
|
||||
struct device *dev)
|
||||
{
|
||||
struct device *cpu_dev;
|
||||
|
||||
pr_debug("%s: Adding symlink for CPU: %u\n", __func__, cpu);
|
||||
|
||||
if (!policy)
|
||||
return 0;
|
||||
|
||||
cpu_dev = get_cpu_device(cpu);
|
||||
if (WARN_ON(!cpu_dev))
|
||||
return 0;
|
||||
|
||||
return sysfs_create_link(&cpu_dev->kobj, &policy->kobj, "cpufreq");
|
||||
dev_dbg(dev, "%s: Adding symlink\n", __func__);
|
||||
return sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq");
|
||||
}
|
||||
|
||||
static void remove_cpu_dev_symlink(struct cpufreq_policy *policy, int cpu)
|
||||
static void remove_cpu_dev_symlink(struct cpufreq_policy *policy,
|
||||
struct device *dev)
|
||||
{
|
||||
struct device *cpu_dev;
|
||||
|
||||
pr_debug("%s: Removing symlink for CPU: %u\n", __func__, cpu);
|
||||
|
||||
cpu_dev = get_cpu_device(cpu);
|
||||
if (WARN_ON(!cpu_dev))
|
||||
return;
|
||||
|
||||
sysfs_remove_link(&cpu_dev->kobj, "cpufreq");
|
||||
}
|
||||
|
||||
/* Add/remove symlinks for all related CPUs */
|
||||
static int cpufreq_add_dev_symlink(struct cpufreq_policy *policy)
|
||||
{
|
||||
unsigned int j;
|
||||
int ret = 0;
|
||||
|
||||
/* Some related CPUs might not be present (physically hotplugged) */
|
||||
for_each_cpu(j, policy->real_cpus) {
|
||||
ret = add_cpu_dev_symlink(policy, j);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void cpufreq_remove_dev_symlink(struct cpufreq_policy *policy)
|
||||
{
|
||||
unsigned int j;
|
||||
|
||||
/* Some related CPUs might not be present (physically hotplugged) */
|
||||
for_each_cpu(j, policy->real_cpus)
|
||||
remove_cpu_dev_symlink(policy, j);
|
||||
dev_dbg(dev, "%s: Removing symlink\n", __func__);
|
||||
sysfs_remove_link(&dev->kobj, "cpufreq");
|
||||
}
|
||||
|
||||
static int cpufreq_add_dev_interface(struct cpufreq_policy *policy)
|
||||
@@ -999,7 +959,7 @@ static int cpufreq_add_dev_interface(struct cpufreq_policy *policy)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return cpufreq_add_dev_symlink(policy);
|
||||
return 0;
|
||||
}
|
||||
|
||||
__weak struct cpufreq_governor *cpufreq_default_governor(void)
|
||||
@@ -1073,13 +1033,9 @@ static void handle_update(struct work_struct *work)
|
||||
|
||||
static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
||||
{
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
struct cpufreq_policy *policy;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(!dev))
|
||||
return NULL;
|
||||
|
||||
policy = kzalloc(sizeof(*policy), GFP_KERNEL);
|
||||
if (!policy)
|
||||
return NULL;
|
||||
@@ -1133,7 +1089,6 @@ static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy, bool notify)
|
||||
|
||||
down_write(&policy->rwsem);
|
||||
cpufreq_stats_free_table(policy);
|
||||
cpufreq_remove_dev_symlink(policy);
|
||||
kobj = &policy->kobj;
|
||||
cmp = &policy->kobj_unregister;
|
||||
up_write(&policy->rwsem);
|
||||
@@ -1215,8 +1170,8 @@ static int cpufreq_online(unsigned int cpu)
|
||||
if (new_policy) {
|
||||
/* related_cpus should at least include policy->cpus. */
|
||||
cpumask_copy(policy->related_cpus, policy->cpus);
|
||||
/* Remember CPUs present at the policy creation time. */
|
||||
cpumask_and(policy->real_cpus, policy->cpus, cpu_present_mask);
|
||||
/* Clear mask of registered CPUs */
|
||||
cpumask_clear(policy->real_cpus);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1331,6 +1286,8 @@ out_free_policy:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void cpufreq_offline(unsigned int cpu);
|
||||
|
||||
/**
|
||||
* cpufreq_add_dev - the cpufreq interface for a CPU device.
|
||||
* @dev: CPU device.
|
||||
@@ -1340,22 +1297,28 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
unsigned cpu = dev->id;
|
||||
int ret;
|
||||
|
||||
dev_dbg(dev, "%s: adding CPU%u\n", __func__, cpu);
|
||||
|
||||
if (cpu_online(cpu))
|
||||
return cpufreq_online(cpu);
|
||||
if (cpu_online(cpu)) {
|
||||
ret = cpufreq_online(cpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* A hotplug notifier will follow and we will handle it as CPU online
|
||||
* then. For now, just create the sysfs link, unless there is no policy
|
||||
* or the link is already present.
|
||||
*/
|
||||
/* Create sysfs link on CPU registration */
|
||||
policy = per_cpu(cpufreq_cpu_data, cpu);
|
||||
if (!policy || cpumask_test_and_set_cpu(cpu, policy->real_cpus))
|
||||
return 0;
|
||||
|
||||
return add_cpu_dev_symlink(policy, cpu);
|
||||
ret = add_cpu_dev_symlink(policy, dev);
|
||||
if (ret) {
|
||||
cpumask_clear_cpu(cpu, policy->real_cpus);
|
||||
cpufreq_offline(cpu);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void cpufreq_offline(unsigned int cpu)
|
||||
@@ -1436,7 +1399,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
|
||||
cpufreq_offline(cpu);
|
||||
|
||||
cpumask_clear_cpu(cpu, policy->real_cpus);
|
||||
remove_cpu_dev_symlink(policy, cpu);
|
||||
remove_cpu_dev_symlink(policy, dev);
|
||||
|
||||
if (cpumask_empty(policy->real_cpus))
|
||||
cpufreq_policy_free(policy, true);
|
||||
|
||||
@@ -260,7 +260,7 @@ static void dbs_irq_work(struct irq_work *irq_work)
|
||||
}
|
||||
|
||||
static void dbs_update_util_handler(struct update_util_data *data, u64 time,
|
||||
unsigned long util, unsigned long max)
|
||||
unsigned int flags)
|
||||
{
|
||||
struct cpu_dbs_info *cdbs = container_of(data, struct cpu_dbs_info, update_util);
|
||||
struct policy_dbs_info *policy_dbs = cdbs->policy_dbs;
|
||||
|
||||
@@ -181,6 +181,8 @@ struct _pid {
|
||||
* @cpu: CPU number for this instance data
|
||||
* @update_util: CPUFreq utility callback information
|
||||
* @update_util_set: CPUFreq utility callback is set
|
||||
* @iowait_boost: iowait-related boost fraction
|
||||
* @last_update: Time of the last update.
|
||||
* @pstate: Stores P state limits for this CPU
|
||||
* @vid: Stores VID limits for this CPU
|
||||
* @pid: Stores PID parameters for this CPU
|
||||
@@ -206,6 +208,7 @@ struct cpudata {
|
||||
struct vid_data vid;
|
||||
struct _pid pid;
|
||||
|
||||
u64 last_update;
|
||||
u64 last_sample_time;
|
||||
u64 prev_aperf;
|
||||
u64 prev_mperf;
|
||||
@@ -216,6 +219,7 @@ struct cpudata {
|
||||
struct acpi_processor_performance acpi_perf_data;
|
||||
bool valid_pss_table;
|
||||
#endif
|
||||
unsigned int iowait_boost;
|
||||
};
|
||||
|
||||
static struct cpudata **all_cpu_data;
|
||||
@@ -229,6 +233,7 @@ static struct cpudata **all_cpu_data;
|
||||
* @p_gain_pct: PID proportional gain
|
||||
* @i_gain_pct: PID integral gain
|
||||
* @d_gain_pct: PID derivative gain
|
||||
* @boost_iowait: Whether or not to use iowait boosting.
|
||||
*
|
||||
* Stores per CPU model static PID configuration data.
|
||||
*/
|
||||
@@ -240,6 +245,7 @@ struct pstate_adjust_policy {
|
||||
int p_gain_pct;
|
||||
int d_gain_pct;
|
||||
int i_gain_pct;
|
||||
bool boost_iowait;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1029,7 +1035,7 @@ static struct cpu_defaults core_params = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct cpu_defaults silvermont_params = {
|
||||
static const struct cpu_defaults silvermont_params = {
|
||||
.pid_policy = {
|
||||
.sample_rate_ms = 10,
|
||||
.deadband = 0,
|
||||
@@ -1037,6 +1043,7 @@ static struct cpu_defaults silvermont_params = {
|
||||
.p_gain_pct = 14,
|
||||
.d_gain_pct = 0,
|
||||
.i_gain_pct = 4,
|
||||
.boost_iowait = true,
|
||||
},
|
||||
.funcs = {
|
||||
.get_max = atom_get_max_pstate,
|
||||
@@ -1050,7 +1057,7 @@ static struct cpu_defaults silvermont_params = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct cpu_defaults airmont_params = {
|
||||
static const struct cpu_defaults airmont_params = {
|
||||
.pid_policy = {
|
||||
.sample_rate_ms = 10,
|
||||
.deadband = 0,
|
||||
@@ -1058,6 +1065,7 @@ static struct cpu_defaults airmont_params = {
|
||||
.p_gain_pct = 14,
|
||||
.d_gain_pct = 0,
|
||||
.i_gain_pct = 4,
|
||||
.boost_iowait = true,
|
||||
},
|
||||
.funcs = {
|
||||
.get_max = atom_get_max_pstate,
|
||||
@@ -1071,7 +1079,7 @@ static struct cpu_defaults airmont_params = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct cpu_defaults knl_params = {
|
||||
static const struct cpu_defaults knl_params = {
|
||||
.pid_policy = {
|
||||
.sample_rate_ms = 10,
|
||||
.deadband = 0,
|
||||
@@ -1091,7 +1099,7 @@ static struct cpu_defaults knl_params = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct cpu_defaults bxt_params = {
|
||||
static const struct cpu_defaults bxt_params = {
|
||||
.pid_policy = {
|
||||
.sample_rate_ms = 10,
|
||||
.deadband = 0,
|
||||
@@ -1099,6 +1107,7 @@ static struct cpu_defaults bxt_params = {
|
||||
.p_gain_pct = 14,
|
||||
.d_gain_pct = 0,
|
||||
.i_gain_pct = 4,
|
||||
.boost_iowait = true,
|
||||
},
|
||||
.funcs = {
|
||||
.get_max = core_get_max_pstate,
|
||||
@@ -1222,36 +1231,18 @@ static inline int32_t get_avg_pstate(struct cpudata *cpu)
|
||||
static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu)
|
||||
{
|
||||
struct sample *sample = &cpu->sample;
|
||||
u64 cummulative_iowait, delta_iowait_us;
|
||||
u64 delta_iowait_mperf;
|
||||
u64 mperf, now;
|
||||
int32_t cpu_load;
|
||||
int32_t busy_frac, boost;
|
||||
|
||||
cummulative_iowait = get_cpu_iowait_time_us(cpu->cpu, &now);
|
||||
busy_frac = div_fp(sample->mperf, sample->tsc);
|
||||
|
||||
/*
|
||||
* Convert iowait time into number of IO cycles spent at max_freq.
|
||||
* IO is considered as busy only for the cpu_load algorithm. For
|
||||
* performance this is not needed since we always try to reach the
|
||||
* maximum P-State, so we are already boosting the IOs.
|
||||
*/
|
||||
delta_iowait_us = cummulative_iowait - cpu->prev_cummulative_iowait;
|
||||
delta_iowait_mperf = div64_u64(delta_iowait_us * cpu->pstate.scaling *
|
||||
cpu->pstate.max_pstate, MSEC_PER_SEC);
|
||||
boost = cpu->iowait_boost;
|
||||
cpu->iowait_boost >>= 1;
|
||||
|
||||
mperf = cpu->sample.mperf + delta_iowait_mperf;
|
||||
cpu->prev_cummulative_iowait = cummulative_iowait;
|
||||
if (busy_frac < boost)
|
||||
busy_frac = boost;
|
||||
|
||||
/*
|
||||
* The load can be estimated as the ratio of the mperf counter
|
||||
* running at a constant frequency during active periods
|
||||
* (C0) and the time stamp counter running at the same frequency
|
||||
* also during C-states.
|
||||
*/
|
||||
cpu_load = div64_u64(int_tofp(100) * mperf, sample->tsc);
|
||||
cpu->sample.busy_scaled = cpu_load;
|
||||
|
||||
return get_avg_pstate(cpu) - pid_calc(&cpu->pid, cpu_load);
|
||||
sample->busy_scaled = busy_frac * 100;
|
||||
return get_avg_pstate(cpu) - pid_calc(&cpu->pid, sample->busy_scaled);
|
||||
}
|
||||
|
||||
static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu)
|
||||
@@ -1325,15 +1316,29 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
|
||||
sample->mperf,
|
||||
sample->aperf,
|
||||
sample->tsc,
|
||||
get_avg_frequency(cpu));
|
||||
get_avg_frequency(cpu),
|
||||
fp_toint(cpu->iowait_boost * 100));
|
||||
}
|
||||
|
||||
static void intel_pstate_update_util(struct update_util_data *data, u64 time,
|
||||
unsigned long util, unsigned long max)
|
||||
unsigned int flags)
|
||||
{
|
||||
struct cpudata *cpu = container_of(data, struct cpudata, update_util);
|
||||
u64 delta_ns = time - cpu->sample.time;
|
||||
u64 delta_ns;
|
||||
|
||||
if (pid_params.boost_iowait) {
|
||||
if (flags & SCHED_CPUFREQ_IOWAIT) {
|
||||
cpu->iowait_boost = int_tofp(1);
|
||||
} else if (cpu->iowait_boost) {
|
||||
/* Clear iowait_boost if the CPU may have been idle. */
|
||||
delta_ns = time - cpu->last_update;
|
||||
if (delta_ns > TICK_NSEC)
|
||||
cpu->iowait_boost = 0;
|
||||
}
|
||||
cpu->last_update = time;
|
||||
}
|
||||
|
||||
delta_ns = time - cpu->sample.time;
|
||||
if ((s64)delta_ns >= pid_params.sample_rate_ns) {
|
||||
bool sample_taken = intel_pstate_sample(cpu, time);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev)
|
||||
|
||||
priv.cpu_clk = of_clk_get_by_name(np, "cpu_clk");
|
||||
if (IS_ERR(priv.cpu_clk)) {
|
||||
dev_err(priv.dev, "Unable to get cpuclk");
|
||||
dev_err(priv.dev, "Unable to get cpuclk\n");
|
||||
return PTR_ERR(priv.cpu_clk);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev)
|
||||
|
||||
priv.ddr_clk = of_clk_get_by_name(np, "ddrclk");
|
||||
if (IS_ERR(priv.ddr_clk)) {
|
||||
dev_err(priv.dev, "Unable to get ddrclk");
|
||||
dev_err(priv.dev, "Unable to get ddrclk\n");
|
||||
err = PTR_ERR(priv.ddr_clk);
|
||||
goto out_cpu;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev)
|
||||
|
||||
priv.powersave_clk = of_clk_get_by_name(np, "powersave");
|
||||
if (IS_ERR(priv.powersave_clk)) {
|
||||
dev_err(priv.dev, "Unable to get powersave");
|
||||
dev_err(priv.dev, "Unable to get powersave\n");
|
||||
err = PTR_ERR(priv.powersave_clk);
|
||||
goto out_ddr;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev)
|
||||
if (!err)
|
||||
return 0;
|
||||
|
||||
dev_err(priv.dev, "Failed to register cpufreq driver");
|
||||
dev_err(priv.dev, "Failed to register cpufreq driver\n");
|
||||
|
||||
clk_disable_unprepare(priv.powersave_clk);
|
||||
out_ddr:
|
||||
|
||||
@@ -105,7 +105,6 @@ static int scpi_cpufreq_remove(struct platform_device *pdev)
|
||||
static struct platform_driver scpi_cpufreq_platdrv = {
|
||||
.driver = {
|
||||
.name = "scpi-cpufreq",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = scpi_cpufreq_probe,
|
||||
.remove = scpi_cpufreq_remove,
|
||||
|
||||
@@ -163,7 +163,7 @@ static int sti_cpufreq_set_opp_info(void)
|
||||
|
||||
reg_fields = sti_cpufreq_match();
|
||||
if (!reg_fields) {
|
||||
dev_err(dev, "This SoC doesn't support voltage scaling");
|
||||
dev_err(dev, "This SoC doesn't support voltage scaling\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ static int __init arm_idle_init(void)
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev) {
|
||||
pr_err("Failed to allocate cpuidle device\n");
|
||||
ret = -ENOMEM;
|
||||
goto out_fail;
|
||||
}
|
||||
dev->cpu = cpu;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user