diff options
-rwxr-xr-x | qdsp-start | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -1,18 +1,29 @@ #!/bin/sh # check if we have a qDSP available on the platform -found=0 + +# new implementation of remoteproc use /sys/class/remoteproc +# instead of debugfs +for f in $(ls -d /sys/class/remoteproc/* 2> /dev/null); do + device=$(readlink -f "$f"/device) + name=$(basename "$device") + if [ "${name%.hexagon}" != "$name" ] ; then + echo "Found Hexagon at $f" + echo start > "$f"/state + exit + fi +done + for f in $(ls /sys/kernel/debug/remoteproc/*/name 2> /dev/null); do name=$(cat "$f") if [ "${name%.hexagon}" != "$name" ] ; then f=$(dirname "$f") echo "Found Hexagon at $f" - found=1 - break + echo start > "$f"/state + exit fi done -# no, then move on.. -[ $found -eq 0 ] && exit +# no found, then move on.. +exit -echo start > "$f"/state |