remoteproc: mediatek: Probe SCP cluster on multi-core SCP
authorTinghan Shen <tinghan.shen@mediatek.com>
Fri, 1 Sep 2023 08:09:29 +0000 (16:09 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 13 Sep 2023 17:45:51 +0000 (11:45 -0600)
commit1fdbf0cdde98c113b17f8cd089a892c5f0437d3e
tree310bce3296409b7cae39b6d70712f3f089097666
parenteaf5b89953b0f88ddc933bd27e120ba4007231ac
remoteproc: mediatek: Probe SCP cluster on multi-core SCP

The difference of single-core SCP and multi-core SCP device tree is
the presence of child device nodes described SCP cores. The SCP
driver populates the platform device and checks the child nodes
to identify whether it's a single-core SCP or a multi-core SCP.

Add the remoteproc instances of multi-core SCP to the SCP cluster list.
When the SCP driver is removed, it cleanup resources by walking
through the cluster list.

Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230901080935.14571-9-tinghan.shen@mediatek.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/mtk_scp.c