remoteproc: mediatek: Refactor single core check and fix retrocompatibility
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 19 Sep 2023 09:23:36 +0000 (11:23 +0200)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 21 Sep 2023 12:43:21 +0000 (06:43 -0600)
commit34eb78f28e5a8f7fd155776cdcdd052325b47c6e
treeb1da77018eb331841b7f087264d98a09895c44cb
parente1592981c51bac38ea2041b642777b3ba30606a8
remoteproc: mediatek: Refactor single core check and fix retrocompatibility

In older devicetrees we had the ChromeOS EC in a node called "cros-ec"
instead of the newer "cros-ec-rpmsg", but this driver is now checking
only for the latter, breaking compatibility with those.

Besides, we can check if the SCP is single or dual core by simply
walking through the children of the main SCP node and checking if
if there's more than one "mediatek,scp-core" compatible node.

Fixes: 1fdbf0cdde98 ("remoteproc: mediatek: Probe SCP cluster on multi-core SCP")
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Tested-by: Laura Nao <laura.nao@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230919092336.51007-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/mtk_scp.c