Merge branch 'CR_2593_PM_mason.huo' into 'jh7110-devel'

CR_2593 package: starfive: Add power management package

See merge request sdk/buildroot!85
This commit is contained in:
andy.hu
2022-11-09 13:39:00 +00:00
4 changed files with 41 additions and 0 deletions
Executable → Regular
+1
View File
@@ -12,3 +12,4 @@ source "package/starfive/e24-test/Config.in"
source "package/starfive/stfisp_setfile/Config.in.host"
source "package/starfive/img-gpu-powervr/Config.in"
source "package/starfive/drm_test/Config.in"
source "package/starfive/pm/Config.in"
+6
View File
@@ -0,0 +1,6 @@
comment "pm package"
config BR2_PACKAGE_PM
bool "pm"
help
Utility for pm initialization & configuration.
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
#
# cpufreq This shell script to config cpufreq parameters.
case "$1" in
start)
# Set the ondemand governor sampling_rate to 100ms.
SYS_CPUFREQ_GOVERNOR=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
if [ -e $SYS_CPUFREQ_GOVERNOR ]; then
echo "ondemand" > $SYS_CPUFREQ_GOVERNOR
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
fi
;;
stop)
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
+12
View File
@@ -0,0 +1,12 @@
################################################################################
#
# pm
#
################################################################################
PM_LICENSE = GPL-2.0+
define PM_INSTALL_TARGET_CMDS
install -m 0755 -D package/starfive/pm/S90cpufreq $(TARGET_DIR)/etc/init.d/
endef
$(eval $(generic-package))