Re: [PATCH v5 6/7] cpufreq:boost:Kconfig: Enable software managed BOOST support at Kconfig

Lukasz Majewski
2013-07-16T11:50:35Z

On Tue, 16 Jul 2013 15:28:40 +0530 Viresh Kumar viresh.kumar@linaro.org
wrote,
> On 4 July 2013 14:20, Lukasz Majewski <l.majewski@samsung.com> wrote:
> > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
>
> > +config CPU_FREQ_BOOST_SW
> > + bool "CPU frequency overclocking (BOOST)"
>
> Name it "CPU Frequency Overclocking - Software"

Thanks, I had a puzzle to came up with a good short name :-).

>
> > + depends on ARM_EXYNOS_CPUFREQ && EXYNOS_THERMAL && EXYNOS_THERMAL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [*]
>
> Remote Exynos from here. If you want to enable it for your platform by
> default, then select it from EXYNOS.

The purpose of the condition [*] here is to prevent from enabling
boost when thermal for Exynos is not supported.

Only for properly configured Exynos (when thermal + cpufreq is set) the
option is possible to enable. And by default it is disabled.
This shall prevent from accidental boost usage.

Please also note, that this switch only affects software based
boost. The HW boost (Intel ACPI) support doesn't depend on this Kconfig
setting.

>
> > + default n
> > + help
> > + This driver supports software managed overclocking (BOOST).
> > + It allows usage of special frequencies for a particular
> > processor
> > + if thermal conditions are appropriate.
> > +
> > + It reguires, for safe operation, thermal framework with
> > properly defined
> > + trip points.
> > +
> > + If in doubt, say N.
> > +
> > config CPU_FREQ_STAT
> > tristate "CPU frequency translation statistics"
> > select CPU_FREQ_TABLE
> > diff --git a/drivers/cpufreq/exynos-cpufreq.c
> > b/drivers/cpufreq/exynos-cpufreq.c index 4f42fcc..7586b28 100644
> > --- a/drivers/cpufreq/exynos-cpufreq.c
> > +++ b/drivers/cpufreq/exynos-cpufreq.c
> > @@ -288,7 +288,9 @@ static struct cpufreq_driver exynos_driver = {
> >
> > static int __init exynos_cpufreq_init(void)
> > {
> > +#ifdef CONFIG_CPU_FREQ_BOOST_SW
> > struct device_node *node = pdev->dev.of_node;
> > +#endif
> > int ret = -EINVAL;
> >
> > exynos_info = kzalloc(sizeof(struct exynos_dvfs_info),
> > GFP_KERNEL); @@ -319,9 +321,10 @@ static int __init
> > exynos_cpufreq_init(void) }
> >
> > locking_frequency = exynos_getspeed(0);
> > +#ifdef CONFIG_CPU_FREQ_BOOST_SW
> > if (of_property_read_bool(node, "boost_mode"))
> > exynos_driver.boost_supported = 1;
> > -
> > +#endif
>
> Add a blank line here.

OK

>
> > register_pm_notifier(&exynos_cpufreq_nb);
> >
> > if (cpufreq_register_driver(&exynos_driver)) {
> > --
> > 1.7.10.4
> >

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group