Skip to content

Commit

Permalink
check-sof-logger: use poll_wait_for() in reload_drivers()
Browse files Browse the repository at this point in the history
Use poll_wait_for() to implement polling for DSP boot.

Signed-off-by: Kai Vehmanen <[email protected]>
Suggested-by: Marc Herbert <[email protected]>
  • Loading branch information
kv2019i committed Sep 6, 2023
1 parent 6220dba commit 45f5023
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test-case/check-sof-logger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,11 @@ reload_drivers()
# The DSP may unfortunately need multiple retries to boot, see
# https://github.com/thesofproject/sof/issues/3395
dlogi "Polling ${CARD_NODE}, waiting for DSP boot..."
for i in $(seq 1 "${MAX_WAIT_FW_LOADING}" ); do
if sudo test -e ${CARD_NODE} ; then
dlogi "Found ${CARD_NODE}."
break;
fi
sleep 1
done

test -e ${CARD_NODE} || die "DSP did not boot (node ${CARD_NODE})"
if poll_wait_for 1 "$MAX_WAIT_FW_LOADING" sudo test -e ${CARD_NODE} ; then
dlogi "Found ${CARD_NODE}."
else
die "DSP did not boot (node ${CARD_NODE})"
fi
}

main()
Expand Down

0 comments on commit 45f5023

Please sign in to comment.