From 0d741c7e3d37d55ba93cad44ac687532783d23b5 Mon Sep 17 00:00:00 2001 From: Choonghoon Park Date: Fri, 15 Jun 2018 17:36:40 +0900 Subject: [PATCH] cpufreq: acme: add API to get boost freq Change-Id: Ifdb43b4fda98b46a7d33be0818db580ec42759da --- drivers/cpufreq/exynos-acme.c | 12 ++++++++---- drivers/cpufreq/exynos-acme.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/exynos-acme.c b/drivers/cpufreq/exynos-acme.c index e701bfc8af9c..861436c8a833 100644 --- a/drivers/cpufreq/exynos-acme.c +++ b/drivers/cpufreq/exynos-acme.c @@ -805,6 +805,12 @@ unsigned int exynos_cpufreq_get_locked(unsigned int cpu) } EXPORT_SYMBOL(exynos_cpufreq_get_locked); +unsigned int __weak exynos_pstate_get_boost_freq(int cpu) +{ + return 0; +} +EXPORT_SYMBOL(exynos_pstate_get_boost_freq); + /********************************************************************* * SYSFS INTERFACES * *********************************************************************/ @@ -1518,12 +1524,10 @@ static __init int init_domain(struct exynos_cpufreq_domain *domain, if (!of_property_read_u32(dn, "min-freq", &val)) domain->min_freq = max(domain->min_freq, val); -#ifdef CONFIG_EXYNOS_PSTATE_MODE_CHANGER /* If this domain has boost freq, change max */ - val = emc_get_boost_freq(cpumask_first(&domain->cpus)); - if (val) + val = exynos_pstate_get_boost_freq(cpumask_first(&domain->cpus)); + if (val > domain->max_freq) domain->max_freq = val; -#endif /* Default QoS for user */ if (!of_property_read_u32(dn, "user-default-qos", &val)) diff --git a/drivers/cpufreq/exynos-acme.h b/drivers/cpufreq/exynos-acme.h index 69a5a6e164e4..7be15e6c9add 100644 --- a/drivers/cpufreq/exynos-acme.h +++ b/drivers/cpufreq/exynos-acme.h @@ -93,3 +93,4 @@ struct exynos_cpufreq_domain { * Exynos CPUFreq API */ extern void exynos_cpufreq_ready_list_add(struct exynos_cpufreq_ready_block *rb); +extern unsigned int exynos_pstate_get_boost_freq(int cpu); -- 2.20.1