mailbox: imx: enlarge timeout while reading/writing messages to SCFW
authorRanjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Mon, 7 Feb 2022 01:52:08 +0000 (09:52 +0800)
committerJassi Brar <jaswinder.singh@linaro.org>
Sun, 13 Mar 2022 01:26:55 +0000 (19:26 -0600)
commit81a9d3b9301c9bb835d8ef595b2456084573db1b
tree7270c6b85af4b5e0ca5c2c6894fa8a7fb3c97bad
parent8219efd08a0aa1d7944bdb66d84ba57549258968
mailbox: imx: enlarge 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>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/imx-mailbox.c