LF-5353: dmaengine: imx-sdma: optimize external firmware load check
authorJoy Zou <joy.zou@nxp.com>
Tue, 25 Jan 2022 11:56:44 +0000 (19:56 +0800)
committerJosep Orga <jorga@somdevices.com>
Tue, 27 Jun 2023 14:03:24 +0000 (16:03 +0200)
commit0131adacab7db825784a7f407221331d41a303f3
tree67f1f24013d5748e14da8489806839e4af8f8c4f
parent1a7c5905e6ef8ef8747bf479a1e827eb306098c0
LF-5353: dmaengine: imx-sdma: optimize external firmware load check

If external firmware has not been loaded, the sdma driver should return
as soon as possible for client using ram script.

The original firmware load check in sdma_transfer_init, if firmware
is not ready, the sdma_config_write also will run, it is unnecessary.

This patch checks firmware load status earlier and return fail immediately
in sdma_config_write if firmware not ready and use ram script.

Signed-off-by: Joy Zou <joy.zou@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
drivers/dma/imx-sdma.c