remoteproc: mediatek: Remove dependency of MT8195 SCP L2TCM power control on dual...
authorTinghan Shen <tinghan.shen@mediatek.com>
Fri, 1 Sep 2023 08:09:30 +0000 (16:09 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 13 Sep 2023 17:45:59 +0000 (11:45 -0600)
commitc6eda63f33cbd6cff7c302869bd9a135b4a8a813
tree284a4df3438d6d1395c2ea9263b084170e83a458
parent1fdbf0cdde98c113b17f8cd089a892c5f0437d3e
remoteproc: mediatek: Remove dependency of MT8195 SCP L2TCM power control on dual-core SCP

Previously, SCP core 0 controlled the power of L2TCM and dictated that
SCP core 1 could only boot after SCP core 0. To address this constraint,
extracted the power control flow of L2TCM and made it shared
between both cores, enabling support for arbitrary boot order.

The flow for controlling L2TCM power has been incorporated into the
mt8195_scp_before_load() and mt8195_scp_stop() APIs, which are
respectively invoked during the rproc->ops->start() and
rproc->ops->stop() operations. These APIs effectively serve the same
purpose as the rproc prepare()/unprepare() APIs."

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-10-tinghan.shen@mediatek.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/mtk_common.h
drivers/remoteproc/mtk_scp.c