cpufreq: Add sfi based cpufreq driver support
PATCH v3 1/1 cpufreq: Add sfi based cpufreq driver support
This adds the sfi based cpu freq driver for some of the Intel's Silver Mont based atom architectures like Merrifield and Moorfield (intel-mid)
---
v2:
* rephrase the Kconfig text
* merge the header file as its not being shared with anyone
* remove the unnecessary checks in sfi_cpufreq_target
* style changes in kzalloc
* fix the potential memory leak sfi_cpufreq_cpu_init
* move the cpufreq driver flag to the structure definition
* remove the redundant init of policy->cpu and policy->cur
* remove the unnecessary check while init the freq table
* merge the for loops in cpu_init
* use cpufreq_generic_attr rather than the custom one
v3:
* Add this change log
* remove the left over not used cached_freq var
* merge yet another for loop in cpu_init
drivers/cpufreq/Kconfig.x86 | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/sfi-cpufreq.c | 326 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) create mode 100644 drivers/cpufreq/sfi-cpufreq.c
drivers/cpufreq/Kconfig.x86 +10 -0
@@ -57,6 +57,16 @@ config X86_ACPI_CPUFREQ_CPB By enabling this option the acpi_cpufreq driver provides the old entry in addition to the new boost ones, for compatibility reasons. +config X86_SFI_CPUFREQ + tristate "SFI Processor P-States driver" + depends on X86_INTEL_MID && SFI + help + This adds a CPUFreq driver for some Silver Mont based Intel + Atom platforms (like INTEL_MID) which utilizes the SFI based + processor performance states. + + If in doubt, say N. + config ELAN_CPUFREQ tristate "AMD Elan SC400 and SC410" depends on MELAN
drivers/cpufreq/Makefile +1 -0
@@ -41,6 +41,7 @@ obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o obj-$(CONFIG_X86_CPUFREQ_NFORCE2) += cpufreq-nforce2.o obj-$(CONFIG_X86_INTEL_PSTATE) += intel_pstate.o obj-$(CONFIG_X86_AMD_FREQ_SENSITIVITY) += amd_freq_sensitivity.o +obj-$(CONFIG_X86_SFI_CPUFREQ) += sfi-cpufreq.o ################################################################################## # ARM SoC drivers
drivers/cpufreq/sfi-cpufreq.c new file +326 -0
326 lines not on this page · raw message
Signature · 4 lines
1.7.9.5 --
Quoted 24 lines · Srinidhi Kasagar
This adds the sfi based cpu freq driver for some of the Intel's Silver Mont based atom architectures like Merrifield and Moorfield (intel-mid)
Signed-off-by Rudramuni, Vishwesh M <[email protected]>Signed-off-by Srinidhi Kasagar <[email protected]>---
v2:
* rephrase theKconfigtext
* merge the header file as its not being shared with anyone
* remove the unnecessary checks insfi_cpufreq_target
* style changes in kzalloc
* fix the potential memory leaksfi_cpufreq_cpu_init
* move the cpufreq driver flag to the structure definition
* remove the redundant init ofpolicy->cpuandpolicy->cur
* remove the unnecessary check while init the freq table
* merge the for loops incpu_init
* usecpufreq_generic_attrrather than the custom onev3:
* Add this change log
* remove the left over not usedcached_freqvar
* merge yet another for loop incpu_init
Quoted 7 lines
drivers/cpufreq/Kconfig.x86 | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/sfi-cpufreq.c | 326 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) create mode 100644 drivers/cpufreq/sfi-cpufreq.cFrom coding perspective:
Quoted 1 line
From X86 working aspect would be good if Rafael or Dirk also
review it :)