aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/mtk_scp_ipi.c
Commit message (Collapse)AuthorAgeFilesLines
* remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizesOlivia Wen2024-04-301-2/+5
| | | | | | | | | | The SCP on different chips will require different DRAM sizes and IPI shared buffer sizes based on varying requirements. Signed-off-by: Olivia Wen <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc: mediatek: Extract SCP common registersTinghan Shen2023-09-131-2/+2
| | | | | | | | | | | | | This is the 1st preliminary steps for probing multi-core SCP. The registers of config and l1tcm are common on single-core SCP and multi-core SCP. Extract these registers out to reduce duplicated fields in mtk_scp when multiple SCP instances are created. Signed-off-by: Tinghan Shen <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc/mtk_scpi_ipi: Fix one kernel-doc commentYang Li2023-03-161-1/+1
| | | | | | | | | | | | | | 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 <[email protected]> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4544 Signed-off-by: Yang Li <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc/mtk_scp: Remove timeout variable from scp_ipi_send()AngeloGioacchino Del Regno2023-01-041-3/+1
| | | | | | | | | | | | 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc/mtk_scp: Use readl_poll_timeout_atomic() for pollingAngeloGioacchino Del Regno2023-01-041-8/+11
| | | | | | | | | | | 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc/mtk_scp: Move clk ops outside send_lockChen-Yu Tsai2023-01-041-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] [Fixed "Fixes:" tag line] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc: Fix remaining wrong return formatting in documentationArnaud Pouliquen2021-12-081-2/+2
| | | | | | | | | | | kernel documentation specification: "The return value, if any, should be described in a dedicated section named Return." Signed-off-by: Arnaud Pouliquen <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
* remoteproc/mediatek: Add support for mt8192 SCPPi-Hsun Shih2020-09-261-2/+3
| | | | | | | | | Add support for mt8192 SCP. Signed-off-by: Pi-Hsun Shih <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
* remoteproc/mediatek: fix null pointer dereference on null scp pointerColin Ian King2020-09-261-3/+1
| | | | | | | | | | | | | 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: 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183") Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
* rpmsg: add rpmsg support for mt8183 SCP.Pi-Hsun Shih2020-01-201-0/+1
| | | | | | | | Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
* remoteproc/mediatek: add SCP support for mt8183Erin Lo2020-01-201-0/+218
Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Signed-off-by: Pi-Hsun Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>