diff options
Diffstat (limited to 'common/scripts/coresight-test.sh')
-rwxr-xr-x | common/scripts/coresight-test.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/scripts/coresight-test.sh b/common/scripts/coresight-test.sh index 003e1d5..483d22f 100755 --- a/common/scripts/coresight-test.sh +++ b/common/scripts/coresight-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Script to test coresight -CORESIGHT_PATH="/sys/kernel/debug/coresight" +CORESIGHT_PATH="/sys/bus/coresight/devices" echo "ls $CORESIGHT_PATH" ls $CORESIGHT_PATH @@ -11,13 +11,17 @@ echo -e "------\t----\t------" for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do for SINK in `ls $CORESIGHT_PATH | grep etb` ; do + echo 1 > $CORESIGHT_PATH/$SINK/enable_sink + wrt_ptr1=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` - echo 1 > $CORESIGHT_PATH/$SOURCE/enable + echo 1 > $CORESIGHT_PATH/$SOURCE/enable_source sleep 1 - echo 0 > $CORESIGHT_PATH/$SOURCE/enable + echo 0 > $CORESIGHT_PATH/$SOURCE/enable_source wrt_ptr2=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` - if [ $wrt_ptr1 == $wrt_ptr2 ] + echo 0 > $CORESIGHT_PATH/$SINK/enable_sink + + if [ $wrt_ptr1 == $wrt_ptr2 ]; then RES="FAIL" else |