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 ...
This commit is contained in:
@@ -151,6 +151,9 @@ struct cpufreq_policy {
|
||||
|
||||
/* For cpufreq driver's internal use */
|
||||
void *driver_data;
|
||||
|
||||
/* Pointer to the cooling device if used for thermal mitigation */
|
||||
struct thermal_cooling_device *cdev;
|
||||
};
|
||||
|
||||
/* Only for ACPI */
|
||||
@@ -254,20 +257,12 @@ __ATTR(_name, 0644, show_##_name, store_##_name)
|
||||
static struct freq_attr _name = \
|
||||
__ATTR(_name, 0200, NULL, store_##_name)
|
||||
|
||||
struct global_attr {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf);
|
||||
ssize_t (*store)(struct kobject *a, struct attribute *b,
|
||||
const char *c, size_t count);
|
||||
};
|
||||
|
||||
#define define_one_global_ro(_name) \
|
||||
static struct global_attr _name = \
|
||||
static struct kobj_attribute _name = \
|
||||
__ATTR(_name, 0444, show_##_name, NULL)
|
||||
|
||||
#define define_one_global_rw(_name) \
|
||||
static struct global_attr _name = \
|
||||
static struct kobj_attribute _name = \
|
||||
__ATTR(_name, 0644, show_##_name, store_##_name)
|
||||
|
||||
|
||||
@@ -330,6 +325,8 @@ struct cpufreq_driver {
|
||||
/* optional */
|
||||
int (*bios_limit)(int cpu, unsigned int *limit);
|
||||
|
||||
int (*online)(struct cpufreq_policy *policy);
|
||||
int (*offline)(struct cpufreq_policy *policy);
|
||||
int (*exit)(struct cpufreq_policy *policy);
|
||||
void (*stop_cpu)(struct cpufreq_policy *policy);
|
||||
int (*suspend)(struct cpufreq_policy *policy);
|
||||
@@ -346,14 +343,15 @@ struct cpufreq_driver {
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if
|
||||
all ->init() calls failed */
|
||||
#define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other
|
||||
kernel "constants" aren't
|
||||
affected by frequency
|
||||
transitions */
|
||||
#define CPUFREQ_PM_NO_WARN (1 << 2) /* don't warn on suspend/resume
|
||||
speed mismatches */
|
||||
|
||||
/* driver isn't removed even if all ->init() calls failed */
|
||||
#define CPUFREQ_STICKY BIT(0)
|
||||
|
||||
/* loops_per_jiffy or other kernel "constants" aren't affected by frequency transitions */
|
||||
#define CPUFREQ_CONST_LOOPS BIT(1)
|
||||
|
||||
/* don't warn on suspend/resume speed mismatches */
|
||||
#define CPUFREQ_PM_NO_WARN BIT(2)
|
||||
|
||||
/*
|
||||
* This should be set by platforms having multiple clock-domains, i.e.
|
||||
@@ -361,14 +359,14 @@ struct cpufreq_driver {
|
||||
* be created in cpu/cpu<num>/cpufreq/ directory and so they can use the same
|
||||
* governor with different tunables for different clusters.
|
||||
*/
|
||||
#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY (1 << 3)
|
||||
#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY BIT(3)
|
||||
|
||||
/*
|
||||
* Driver will do POSTCHANGE notifications from outside of their ->target()
|
||||
* routine and so must set cpufreq_driver->flags with this flag, so that core
|
||||
* can handle them specially.
|
||||
*/
|
||||
#define CPUFREQ_ASYNC_NOTIFICATION (1 << 4)
|
||||
#define CPUFREQ_ASYNC_NOTIFICATION BIT(4)
|
||||
|
||||
/*
|
||||
* Set by drivers which want cpufreq core to check if CPU is running at a
|
||||
@@ -377,13 +375,19 @@ struct cpufreq_driver {
|
||||
* from the table. And if that fails, we will stop further boot process by
|
||||
* issuing a BUG_ON().
|
||||
*/
|
||||
#define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5)
|
||||
#define CPUFREQ_NEED_INITIAL_FREQ_CHECK BIT(5)
|
||||
|
||||
/*
|
||||
* Set by drivers to disallow use of governors with "dynamic_switching" flag
|
||||
* set.
|
||||
*/
|
||||
#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6)
|
||||
#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING BIT(6)
|
||||
|
||||
/*
|
||||
* Set by drivers that want the core to automatically register the cpufreq
|
||||
* driver as a thermal cooling device.
|
||||
*/
|
||||
#define CPUFREQ_IS_COOLING_DEV BIT(7)
|
||||
|
||||
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
|
||||
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
|
||||
|
19
include/linux/platform_data/davinci-cpufreq.h
Normal file
19
include/linux/platform_data/davinci-cpufreq.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* TI DaVinci CPUFreq platform support.
|
||||
*
|
||||
* Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
|
||||
*/
|
||||
|
||||
#ifndef _MACH_DAVINCI_CPUFREQ_H
|
||||
#define _MACH_DAVINCI_CPUFREQ_H
|
||||
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
struct davinci_cpufreq_config {
|
||||
struct cpufreq_frequency_table *freq_table;
|
||||
int (*set_voltage)(unsigned int index);
|
||||
int (*init)(void);
|
||||
};
|
||||
|
||||
#endif /* _MACH_DAVINCI_CPUFREQ_H */
|
@@ -327,6 +327,7 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpuma
|
||||
struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev);
|
||||
struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp);
|
||||
int of_get_required_opp_performance_state(struct device_node *np, int index);
|
||||
void dev_pm_opp_of_register_em(struct cpumask *cpus);
|
||||
#else
|
||||
static inline int dev_pm_opp_of_add_table(struct device *dev)
|
||||
{
|
||||
@@ -365,6 +366,11 @@ static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void dev_pm_opp_of_register_em(struct cpumask *cpus)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
|
Reference in New Issue
Block a user