aboutsummaryrefslogtreecommitdiff
path: root/Documentation/cpu-freq/cpufreq-arm-bl.txt
blob: 52e2f3ad7618bf1eb5e65d381b303d886b78a7de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Synchronous cluster switching interface for the ARM big.LITTLE switcher
-----------------------------------------------------------------------

The arm-bl-cpufreq driver provides a simple interface which models two
clusters as two performance points.

Within each CPU's cpufreq directory in sysfs
(/sys/devices/system/cpu/cpu?/cpufreq/):

cpuinfo_max_freq:

	reports the dummy frequency value which corresponds to the "big"
	cluster.

cpuinfo_min_freq:

	reports the dummy frequency value which corresponds to the
	"little" cluster.

cpuinfo_cur_freq:

	reports the dummy frequency corresponding to the currently
	running cluster.


To switch clusters, either the built-in "powersave" or "performance"
governors can be used to force the "little" or "big" cluster
respectively; or alternatively the "userspace" governor can be used,

The following script fragment demonstrates how the userspace governor
can be used to switch:


for x in /sys/devices/system/cpu/cpu[0-9]*; do
	echo userspace >$x/cpufreq/scaling_governor
done

big_freq=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
little_freq=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`

switch_to_big () {
	echo $big_freq >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
}

switch_to_little () {
	echo $little_freq >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
}