MLK-25473-3 dmaengine: imx-sdma: split request firmware from runtime
split request_firmware from sdma_runtime_resume, because in nfs case,
request_firmware may trigger sleep which cause kernel below complain during
runtime_get_sync in atmoic case like audio record. Actually, only one time
for request_firmware after kernel boot, split it from runtime resume and
only load_scripts instead 'request_firmware + load_script'.
[ 63.115924] BUG: scheduling while atomic: arecord/613/0x00000002
[ 63.121970] Modules linked in:
[ 63.125031] CPU: 3 PID: 613 Comm: arecord Not tainted
5.10.31-104197-ged911ffb5e2f #339
[ 63.133033] Hardware name: NXP i.MX8MPlus EVK board (DT)
[ 63.138343] Call trace:
[ 63.140795] dump_backtrace+0x0/0x1c8
[ 63.144458] show_stack+0x14/0x60
[ 63.147775] dump_stack+0xd0/0x128
[ 63.151178] __schedule_bug+0x54/0x78
[ 63.154843] __schedule+0x5c8/0x690
[ 63.158332] schedule+0x6c/0x108
[ 63.161560] rpc_wait_bit_killable+0x24/0xa8
[ 63.165831] __wait_on_bit+0xa4/0xe0
[ 63.169405] out_of_line_wait_on_bit+0x8c/0xb0
[ 63.173848] __rpc_execute+0x138/0x338
[ 63.177596] rpc_execute+0x88/0xa8
[ 63.180998] rpc_run_task+0x154/0x1a8
[ 63.184661] rpc_call_sync+0x54/0xa8
[ 63.188239] nfs3_rpc_wrapper+0x50/0xd0
[ 63.192074] nfs3_proc_access+0x7c/0xe0
[ 63.195910] nfs_do_access+0xa0/0x1b8
[ 63.199571] nfs_permission+0xac/0x1b0
[ 63.203321] inode_permission+0xdc/0x170
[ 63.207243] link_path_walk+0x1f4/0x350
[ 63.211078] path_openat+0x80/0xd50
[ 63.214565] do_file_open_root+0xa4/0x150
[ 63.218576] file_open_root+0xf4/0x178
[ 63.222326] kernel_read_file_from_path_initns+0xb0/0x138
[ 63.227726] _request_firmware+0x39c/0x588
[ 63.231821] request_firmware+0x44/0x68
[ 63.235659] sdma_runtime_resume+0x1a0/0x280
[ 63.239929] pm_generic_runtime_resume+0x28/0x40
[ 63.244546] __genpd_runtime_resume+0x2c/0x80
[ 63.248902] genpd_runtime_resume+0x130/0x1e8
[ 63.253260] __rpm_callback+0xd8/0x150
[ 63.257008] rpm_callback+0x24/0x98
[ 63.260498] rpm_resume+0x338/0x4b0
[ 63.263986] __pm_runtime_resume+0x38/0x88
[ 63.268082] sdma_prep_dma_cyclic+0x264/0x290
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>