mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
cpufreq: rockchip: Remove unuse code
Change-Id: I9cef76097811d96e1197eb7c5ecdc48d9e1fc286 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -261,56 +261,6 @@ int rockchip_cpufreq_check_rate_volt(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rockchip_cpufreq_check_rate_volt);
|
||||
|
||||
int rockchip_cpufreq_set_temp_limit_rate(struct device *dev, unsigned long rate)
|
||||
{
|
||||
struct cluster_info *cluster;
|
||||
|
||||
cluster = rockchip_cluster_lookup_by_dev(dev);
|
||||
if (!cluster)
|
||||
return -EINVAL;
|
||||
cluster->temp_limit_rate = rate / 1000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rockchip_cpufreq_set_temp_limit_rate);
|
||||
|
||||
int rockchip_cpufreq_update_policy(struct device *dev)
|
||||
{
|
||||
struct cluster_info *cluster;
|
||||
unsigned int cpu;
|
||||
|
||||
cluster = rockchip_cluster_lookup_by_dev(dev);
|
||||
if (!cluster)
|
||||
return -EINVAL;
|
||||
cpu = cpumask_any(&cluster->cpus);
|
||||
cpufreq_update_policy(cpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rockchip_cpufreq_update_policy);
|
||||
|
||||
int rockchip_cpufreq_update_cur_volt(struct device *dev)
|
||||
{
|
||||
struct cluster_info *cluster;
|
||||
struct cpufreq_policy *policy;
|
||||
unsigned int cpu;
|
||||
|
||||
cluster = rockchip_cluster_lookup_by_dev(dev);
|
||||
if (!cluster)
|
||||
return -EINVAL;
|
||||
cpu = cpumask_any(&cluster->cpus);
|
||||
|
||||
policy = cpufreq_cpu_get(cpu);
|
||||
if (!policy)
|
||||
return -ENODEV;
|
||||
down_write(&policy->rwsem);
|
||||
dev_pm_opp_check_rate_volt(dev, false);
|
||||
up_write(&policy->rwsem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rockchip_cpufreq_update_cur_volt);
|
||||
|
||||
static int rockchip_cpufreq_cluster_init(int cpu, struct cluster_info *cluster)
|
||||
{
|
||||
struct device_node *np;
|
||||
@@ -454,11 +404,6 @@ static int rockchip_cpufreq_policy_notifier(struct notifier_block *nb,
|
||||
policy->max = cluster->scale_rate;
|
||||
}
|
||||
|
||||
if (cluster->temp_limit_rate) {
|
||||
if (cluster->temp_limit_rate < policy->max)
|
||||
policy->max = cluster->temp_limit_rate;
|
||||
}
|
||||
|
||||
if (cluster->rebooting) {
|
||||
if (cluster->reboot_freq < policy->max)
|
||||
policy->max = cluster->reboot_freq;
|
||||
|
||||
@@ -699,11 +699,7 @@ unsigned long cpufreq_scale_max_freq_capacity(int cpu);
|
||||
unsigned int rockchip_cpufreq_adjust_target(int cpu, unsigned int freq);
|
||||
int rockchip_cpufreq_get_scale(int cpu);
|
||||
int rockchip_cpufreq_set_scale_rate(struct device *dev, unsigned long rate);
|
||||
int rockchip_cpufreq_set_temp_limit_rate(struct device *dev,
|
||||
unsigned long rate);
|
||||
int rockchip_cpufreq_check_rate_volt(struct device *dev);
|
||||
int rockchip_cpufreq_update_policy(struct device *dev);
|
||||
int rockchip_cpufreq_update_cur_volt(struct device *dev);
|
||||
#else
|
||||
static inline unsigned int rockchip_cpufreq_adjust_target(int cpu,
|
||||
unsigned int freq)
|
||||
@@ -727,21 +723,5 @@ static inline int rockchip_cpufreq_check_rate_volt(struct device *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int rockchip_cpufreq_set_temp_limit_rate(struct device *dev,
|
||||
unsigned long rate)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int rockchip_cpufreq_update_policy(struct device *dev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int rockchip_cpufreq_update_cur_volt(struct device *dev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* _LINUX_CPUFREQ_H */
|
||||
|
||||
Reference in New Issue
Block a user