This source file includes following definitions.
- ve_spc_init_opp_table
- ve_spc_get_transition_latency
- ve_spc_cpufreq_probe
- ve_spc_cpufreq_remove
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
20
21 #include <linux/cpu.h>
22 #include <linux/cpufreq.h>
23 #include <linux/module.h>
24 #include <linux/platform_device.h>
25 #include <linux/pm_opp.h>
26 #include <linux/types.h>
27
28 #include "arm_big_little.h"
29
30 static int ve_spc_init_opp_table(const struct cpumask *cpumask)
31 {
32 struct device *cpu_dev = get_cpu_device(cpumask_first(cpumask));
33
34
35
36
37 return dev_pm_opp_get_opp_count(cpu_dev) <= 0;
38 }
39
40 static int ve_spc_get_transition_latency(struct device *cpu_dev)
41 {
42 return 1000000;
43 }
44
45 static const struct cpufreq_arm_bL_ops ve_spc_cpufreq_ops = {
46 .name = "vexpress-spc",
47 .get_transition_latency = ve_spc_get_transition_latency,
48 .init_opp_table = ve_spc_init_opp_table,
49 };
50
51 static int ve_spc_cpufreq_probe(struct platform_device *pdev)
52 {
53 return bL_cpufreq_register(&ve_spc_cpufreq_ops);
54 }
55
56 static int ve_spc_cpufreq_remove(struct platform_device *pdev)
57 {
58 bL_cpufreq_unregister(&ve_spc_cpufreq_ops);
59 return 0;
60 }
61
62 static struct platform_driver ve_spc_cpufreq_platdrv = {
63 .driver = {
64 .name = "vexpress-spc-cpufreq",
65 },
66 .probe = ve_spc_cpufreq_probe,
67 .remove = ve_spc_cpufreq_remove,
68 };
69 module_platform_driver(ve_spc_cpufreq_platdrv);
70
71 MODULE_LICENSE("GPL");