summaryrefslogtreecommitdiff
path: root/jetson-tk1
diff options
context:
space:
mode:
authorLeonardo Graboski Veiga <leogveiga@gmail.com>2017-03-27 13:18:41 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-04-10 09:11:43 +0200
commit2716f83906094878e24b93c8ae1b7c6babbb5076 (patch)
tree6b507e1d9facbb97fcfefd666d65fd776277cc0d /jetson-tk1
parent84785dff2f5eb8c1b3f682ce934b0b4e219a135a (diff)
nv-conf-systemd: remove emmc read ahead configuration
The read_ahead configuration is now set using udev. The script run from udev was added to meta-toradex-bsp-common, since it applies to all modules with eMMC. Signed-off-by: Leonardo Graboski Veiga <leogveiga@gmail.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'jetson-tk1')
-rwxr-xr-xjetson-tk1/recipes-bsp/binary-drivers/linux-driver-package/nv87
1 files changed, 87 insertions, 0 deletions
diff --git a/jetson-tk1/recipes-bsp/binary-drivers/linux-driver-package/nv b/jetson-tk1/recipes-bsp/binary-drivers/linux-driver-package/nv
new file mode 100755
index 0000000..2221688
--- /dev/null
+++ b/jetson-tk1/recipes-bsp/binary-drivers/linux-driver-package/nv
@@ -0,0 +1,87 @@
+#!/bin/sh
+#"NVIDIA specific init script"
+
+nvexec() {
+ # power state
+ if [ -e /sys/power/state ]; then
+ chmod 0666 /sys/power/state
+ fi
+
+ # Set minimum cpu freq.
+ if [ -e /sys/devices/soc0/family ]; then
+ SOCFAMILY="`cat /sys/devices/soc0/family`"
+ fi
+
+ if [ "$SOCFAMILY" = "Tegra13" ] &&
+ [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ]; then
+ sudo bash -c "echo -n 510000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
+ fi
+
+ # CPU hotplugging
+ if [ -d /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet ] ; then
+ echo 500 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/down_delay
+ echo 1 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
+ elif [ -w /sys/module/cpu_tegra3/parameters/auto_hotplug ] ; then
+ # compatibility for prior kernels without cpuquiet support
+ echo 1 > /sys/module/cpu_tegra3/parameters/auto_hotplug
+ fi
+
+ # lp2 idle state
+ if [ -e /sys/module/cpuidle/parameters/power_down_in_idle ] ; then
+ echo "Y" > /sys/module/cpuidle/parameters/power_down_in_idle
+ elif [ -e /sys/module/cpuidle/parameters/lp2_in_idle ] ; then
+ # compatibility for prior kernels
+ echo "Y" > /sys/module/cpuidle/parameters/lp2_in_idle
+ fi
+
+ #FIXME remove once kernel CL merges into main Bug 1231069
+ for uartInst in 0 1 2 3
+ do
+ uartNode="/dev/ttyHS$uartInst"
+ if [ -e "$uartNode" ]; then
+ ln -s /dev/ttyHS$uartInst /dev/ttyTHS$uartInst
+ fi
+ done
+ # remove power to dc.0 for jetson-tk1
+ machine=`cat /sys/devices/soc0/machine`
+ if [ "${machine}" = "jetson-tk1" ] ; then
+ echo 4 > /sys/class/graphics/fb0/blank
+ if [ -e /sys/devices/platform/tegra-otg/enable_device ] ; then
+ echo 0 > /sys/devices/platform/tegra-otg/enable_device
+ fi
+ if [ -e /sys/devices/platform/tegra-otg/enable_host ] ; then
+ echo 1 > /sys/devices/platform/tegra-otg/enable_host
+ fi
+ fi
+
+ # CPU frequency governor
+ if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ]; then
+ read governors < /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
+ case $governors in
+ *interactive*)
+ echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ if [ -e /sys/devices/system/cpu/cpufreq/interactive ] ; then
+ echo "1224000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo "95" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ fi
+
+ # CPU frequency boost on input event
+ if [ -e /sys/module/input_cfboost/parameters/boost_freq ]; then
+ echo "1224000" > /sys/module/input_cfboost/parameters/boost_freq
+ fi
+}
+
+case "$1" in
+ start)
+ nvexec
+ exit 0
+ ;;
+ *)
+ exit 1
+esac