From 3da0296e8c4235c9a8e5c5f81b8f1f66740825eb Mon Sep 17 00:00:00 2001 From: Vijay Dandiga Date: Wed, 10 Dec 2014 22:34:22 +0530 Subject: Update coresight-test.sh --- common/scripts/coresight-test.sh | 12 ++++++++---- 1 file 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 -- cgit v1.2.3