LF-4858: dmaengine: imx-sdma: retry load sdma firmware fail
If there is more than one sdma controller, the first controller
load sdma firmware using fallback failed in first time, it will
retry load sdma firmware again. But the second sdma controller
error state clean up may be still not finished (the firmware
request priv data has not been released). So the retry will fail
immediately due to get the old firmware priv data.
The fail log as follow:
[ 62.505753] imx-sdma
30e10000.dma-controller: external firmware not found, using ROM firmware
[ 62.599868] imx-sdma
30bd0000.dma-controller: firmware found.
[ 62.605808] imx-sdma
30bd0000.dma-controller: loaded firmware 4.6
This patch adds a bit delay to wait for the second controller
firmware priv data released.
This issue is very hard to reproduce with yocto rootfs.
The 20ms delay is tested value with ubuntu rootfs which is more easy
to reproduce.
Signed-off-by: Joy Zou <joy.zou@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>