remoteproc/mtk_scp: Move clk ops outside send_lock
authorChen-Yu Tsai <wenst@chromium.org>
Wed, 4 Jan 2023 08:31:10 +0000 (16:31 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 4 Jan 2023 22:16:40 +0000 (15:16 -0700)
commite46ceea3148163166ef9b7bcac578e72dd30c064
treed204816f8e9610efafa5058a2061835171e947e9
parentcf5865e72236c239317d6c5829ab170419b400a4
remoteproc/mtk_scp: Move clk ops outside send_lock

Clocks are properly reference counted and do not need to be inside the
lock range.

Right now this triggers a false-positive lockdep warning on MT8192 based
Chromebooks, through a combination of mtk-scp that has a cros-ec-rpmsg
sub-device, the (actual) cros-ec I2C adapter registration, I2C client
(not on cros-ec) probe doing i2c transfers and enabling clocks.

This is a false positive because the cros-ec-rpmsg under mtk-scp does
not have an I2C adapter, and also each I2C adapter and cros-ec instance
have their own mutex.

Move the clk operations outside of the send_lock range.

Fixes: 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230104083110.736377-1-wenst@chromium.org
[Fixed "Fixes:" tag line]
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/mtk_scp_ipi.c