LF-3354 mailbox:imx: Driver cannot timeout while reading/writing messages to SCFW
authorRanjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Fri, 29 Jan 2021 21:43:26 +0000 (15:43 -0600)
committerJason Liu <jason.hui.liu@nxp.com>
Tue, 2 Feb 2021 13:11:36 +0000 (21:11 +0800)
commit5c3d57d3bf51c2996ef0b0aec03f25bd7aed3419
tree32ee5ee6d4149f5a852045767b35eabd537b07f6
parent3e8f52c8d63ad02139e1b6f936d116286de4a369
LF-3354 mailbox:imx: Driver cannot timeout while reading/writing messages to SCFW

Mailbox driver needs to wait and read all the words in response to a
SCFW API call, else the protocol gets messed up and results in kernel hang.
When the responses are longer than 3 words its possible that SCFW will
take some time to fill up the rest of the words in the MU, a timeout of
100us is arbritrary and too short. While waiting for Linux to consume the
first 3 words of the response SCFW can be busy doing other stuff and hence
Linux needs to wait for the rest of the words.
Similar restriction applies when writing messages that are longer than
3 words.
This patch increases the timeout to 5secs while waiting for response
or writing long messages to SCFW.

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
drivers/mailbox/imx-mailbox.c