op_osupgrade: add some sanity checks
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_sysspeed.sh
1 #!/bin/sh
2
3 if [ ! -e /proc/pandora/sys_mhz_max ]; then
4   echo "error: no support in kernel"
5   exit 1
6 fi
7 if [ $# -ne 1 ]; then
8   echo "usage:"
9   echo "$0 <sys_clock>"
10   exit 1
11 fi
12
13 sync
14
15 # TODO: we need to stop all RAM users here, that includes DMAs and DSP
16 # only handling the display for now..
17 echo 1 > /sys/class/graphics/fb0/blank
18 echo $1 > /proc/pandora/sys_mhz_max
19 echo 0 > /sys/class/graphics/fb0/blank