remoteproc: mtk_scp: Reorder scp_probe() sequence
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 24 Jan 2022 12:09:14 +0000 (13:09 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 2 Feb 2022 15:32:27 +0000 (08:32 -0700)
commit77c792b91208b28ad5f09771f990a8d0278e7f29
treeef0a2e03bcb090fcb9fac6617ecbe04b847f6ec1
parentc1407ac1099ab9726c31d38d806f3150f494c494
remoteproc: mtk_scp: Reorder scp_probe() sequence

Cleanup the scp_probe() function by reordering some calls in this
function, useful to reduce the usage of goto(s), and preparing
for one more usage of dev_err_probe().

In particular, we can get the clocks before mapping the memory region,
and move the mutexes initialization right before registering the ipi
handler (which is the first mutex user in this driver).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220124120915.41292-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/mtk_scp.c