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:
parent
75967a24f9
commit
e4662716fb
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue