misc: atsha204a: add delay after sending the message

Once request is sent, and before receiving a response, the delay is required.
This patch fixes missing delay for before first response try.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
This commit is contained in:
Adrian Fiergolski 2022-01-11 19:05:30 +01:00 committed by Heiko Schocher
parent 75967a24f9
commit e4662716fb

View file

@ -280,6 +280,7 @@ static int atsha204a_transaction(struct udevice *dev, struct atsha204a_req *req,
}
do {
udelay(ATSHA204A_EXECTIME);
res = atsha204a_recv_resp(dev, resp);
if (!res || res == -EMSGSIZE || res == -EBADMSG)
break;
@ -287,7 +288,6 @@ static int atsha204a_transaction(struct udevice *dev, struct atsha204a_req *req,
debug("ATSHA204A transaction polling for response "
"(timeout = %d)\n", timeout);
udelay(ATSHA204A_EXECTIME);
timeout -= ATSHA204A_EXECTIME;
} while (timeout > 0);