Yang Li
e19967994d
remoteproc/mtk_scpi_ipi: Fix one kernel-doc comment
...
Fix the function name in kernel-doc comments to clear the below
warning:
drivers/remoteproc/mtk_scp_ipi.c:136: warning: expecting prototype for scp_ipi_lock(). Prototype was for scp_ipi_unlock() instead
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4544
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230316084011.99613-1-yang.lee@linux.alibaba.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
2023-03-16 12:12:18 -06:00
AngeloGioacchino Del Regno
ac8723e888
remoteproc/mtk_scp: Remove timeout variable from scp_ipi_send()
...
That variable was used twice, but now it's just used once to store
msecs_to_jiffies(wait), fed to wait_event_timeout(): we might as
well remove it for the sake of cleaning up.
This brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230104115341.320951-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
2023-01-04 15:46:17 -07:00
AngeloGioacchino Del Regno
fad151d52b
remoteproc/mtk_scp: Use readl_poll_timeout_atomic() for polling
...
Convert the usage of an open-coded custom tight poll while loop
with the provided readl_poll_timeout_atomic() macro.
This cleanup brings no functional change.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230104115341.320951-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
2023-01-04 15:43:38 -07:00
Chen-Yu Tsai
e46ceea314
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: 63c13d61ea ("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 >
2023-01-04 15:16:40 -07:00
Arnaud Pouliquen
8f86e69536
remoteproc: Fix remaining wrong return formatting in documentation
...
kernel documentation specification:
"The return value, if any, should be described in a dedicated section
named Return."
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20211206191858.10741-1-arnaud.pouliquen@foss.st.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
2021-12-08 10:09:40 -07:00
Pi-Hsun Shih
fd0b6c1ff8
remoteproc/mediatek: Add support for mt8192 SCP
...
Add support for mt8192 SCP.
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org >
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com >
Link: https://lore.kernel.org/r/20200921094847.2112399-1-pihsun@chromium.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
2020-09-25 23:37:42 -05:00
Colin Ian King
434ac4d514
remoteproc/mediatek: fix null pointer dereference on null scp pointer
...
Currently when pointer scp is null a dev_err is being called that
references the pointer which is the very thing we are trying to
avoid doing. Remove the extraneous error message to avoid this
issue.
Addresses-Coverity: ("Dereference after null check")
Fixes: 63c13d61ea ("remoteproc/mediatek: add SCP support for mt8183")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20200918152428.27258-1-colin.king@canonical.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
2020-09-25 23:33:23 -05:00
Pi-Hsun Shih
7017996951
rpmsg: add rpmsg support for mt8183 SCP.
...
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly.
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org >
Link: https://lore.kernel.org/r/20191112110330.179649-4-pihsun@chromium.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
2020-01-20 10:29:56 -08:00
Erin Lo
63c13d61ea
remoteproc/mediatek: add SCP support for mt8183
...
Provide a basic driver to control Cortex M4 co-processor
Signed-off-by: Erin Lo <erin.lo@mediatek.com >
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org >
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org >
Link: https://lore.kernel.org/r/20191112110330.179649-3-pihsun@chromium.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
2020-01-20 10:29:54 -08:00