cpufreq: acme: add API to get boost freq
authorChoonghoon Park <choong.park@samsung.com>
Fri, 15 Jun 2018 08:36:40 +0000 (17:36 +0900)
committerlakkyung.jung <lakkyung.jung@samsung.com>
Mon, 23 Jul 2018 05:59:37 +0000 (14:59 +0900)
Change-Id: Ifdb43b4fda98b46a7d33be0818db580ec42759da

drivers/cpufreq/exynos-acme.c
drivers/cpufreq/exynos-acme.h

index e701bfc8af9cb333d6d004ac5d0c110250143fce..861436c8a8334db3a2655d517cdb20e8497a24bf 100644 (file)
@@ -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))
index 69a5a6e164e468e5003b8f17989dc8c289169f05..7be15e6c9add7563ac3e705790d697e17cfd132f 100644 (file)
@@ -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);