cpufreq: rockchip: Remove unuse code

Change-Id: I9cef76097811d96e1197eb7c5ecdc48d9e1fc286
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
Finley Xiao
2019-04-02 17:13:38 +08:00
committed by Tao Huang
parent 60feaac72b
commit ee2ff57e04
2 changed files with 0 additions and 75 deletions

View File

@@ -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;

View File

@@ -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 */