赞
踩
root@am335x-evm:/sys/devices/system/cpu/cpu0/cpufreq# ls
affected_cpus scaling_cur_freq
cpuinfo_cur_freq scaling_driver
cpuinfo_max_freq scaling_governor
cpuinfo_min_freq scaling_max_freq
cpuinfo_transition_latency scaling_min_freq
related_cpus scaling_setspeed
scaling_available_frequencies stats
scaling_available_governors
root@ATK-IMX6U:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
792000
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
198000 396000 528000 792000
root@ATK-IMX6U:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 12.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Freescale i.MX6 Ultralite (Device Tree)
Revision : 0000
Serial : 0000000000000000
BogoMIPS 为 12.00,处理器性能越强,主频越高,BogoMIPS 值就越大。
查看内核中的主频属性设置
CPU Power Management
-> CPU Frequency scaling
-> CPU Frequency scaling
-> Default CPUFreq governor
但是在以后的实际产品开发中,从省电的角度考虑,建议使用 ondemand 模式,一来可以省电,二来可以减少发热。
编译后zImage ,启动后查看参数
root@ATK-IMX6U:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
528000
当前频率降低了,为528M
root@ATK-IMX6U:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Freescale i.MX6 Ultralite (Device Tree)
Revision : 0000
Serial : 0000000000000000
BogoMIPS 数值变小了
修改方法 设备树文件 arch/arm/boot/dts/imx6ull.dtsi
cpus { #address-cells = <1>; #size-cells = <0>; cpu0: cpu@0 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <0>; clock-latency = <61036>; /* two CLK32 periods */ operating-points = < /* kHz uV */ 996000 1275000 792000 1225000 528000 1175000 396000 1025000 198000 950000 >; fsl,soc-operating-points = < /* KHz uV */ 996000 1175000 792000 1175000 528000 1175000 396000 1175000 198000 1175000 >;
加入针对 696MHz 的支持
cpus { #address-cells = <1>; #size-cells = <0>; cpu0: cpu@0 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <0>; clock-latency = <61036>; /* two CLK32 periods */ operating-points = < /* kHz uV */ 996000 1275000 792000 1225000 696000 1175000 528000 1175000 396000 1025000 198000 950000 >; fsl,soc-operating-points = < /* KHz uV */ 996000 1175000 792000 1175000 696000 1175000 528000 1175000 396000 1175000 198000 1175000 >;
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
编译完成以后使用新的设备 树 文 件 imx6ull-alientek_emmc.dtb 启 动 Linux
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
198000 396000 528000 696000 792000
选项中有696M频率
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。