mbox series

[V3,0/2] LoongArch: Add Loongson-3 CPUFreq driver support

Message ID 20240705060650.243497-1-chenhuacai@loongson.cn (mailing list archive)
Headers show
Series LoongArch: Add Loongson-3 CPUFreq driver support | expand

Message

Huacai Chen July 5, 2024, 6:06 a.m. UTC
This series add architectural preparation and CPUFreq driver for
Loongson-3 (based on LoongArch).

Some of LoongArch processors support DVFS, their IOCSR.FEATURES has
IOCSRF_FREQSCALE set. And they has a micro-core in the package called
SMC (System Management Controller) to scale frequency, voltage, etc.

V1 -> V2:
1, Use module_platform_driver() instead of module_init()/module_exit();
2, Move the lock protection into do_service_request();
3, Add light-weight hotplug support with help of online()/offline() callbacks;
4, Simplify loongson3_freq_data by removing cur_cpu_freq;
5, Remove unneeded cpu_online() checking.

V2 -> V3:
1, Sort header files in alphabetical order;
2, Use devm_kzalloc() instead of kzalloc();
3, Set to the default frequency at module exit and suspend;
4, Simplify loongson3_cpufreq_probe() and loongson3_cpufreq_target();
5, Update and fix comments.

Huacai Chen(2):
 LoongArch: Add architectural preparation for CPUFreq.
 cpufreq: Add Loongson-3 CPUFreq driver support.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
2.27.0