linux/drivers/remoteproc
Nícolas F. R. A. Prado 67ca3f9807 remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing
The current code doesn't check whether platform_get_resource_byname()
succeeded to get the l1tcm memory, which is optional, before attempting
to map it. This results in the following error message when it is
missing:

  mtk-scp 10500000.scp: error -EINVAL: invalid resource (null)

Add a check so that the remapping is only attempted if the memory region
exists. This also allows to simplify the logic handling failure to
remap, since a failure then is always a failure.

Fixes: ca23ecfdbd ("remoteproc/mediatek: support L1TCM")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240627-scp-invalid-resource-l1tcm-v1-1-7d221e6c495a@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-06-28 11:56:24 -06:00
..
da8xx_remoteproc.c
imx_dsp_rproc.c remoteproc updates for v6.9 2024-03-21 10:37:39 -07:00
imx_rproc.c remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init 2024-06-17 08:39:00 -06:00
imx_rproc.h
ingenic_rproc.c
Kconfig
keystone_remoteproc.c
Makefile
meson_mx_ao_arc.c
mtk_common.h remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes 2024-04-30 10:43:59 -06:00
mtk_scp_ipi.c remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes 2024-04-30 10:43:59 -06:00
mtk_scp.c remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing 2024-06-28 11:56:24 -06:00
omap_remoteproc.c remoteproc: omap: Use devm_rproc_add() helper 2024-06-13 10:05:11 -06:00
omap_remoteproc.h
pru_rproc.c
pru_rproc.h
qcom_common.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_common.h remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_pil_info.c
qcom_pil_info.h
qcom_q6v5_adsp.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5_mss.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5_pas.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5_wcss.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5.c
qcom_q6v5.h
qcom_sysmon.c
qcom_wcnss_iris.c
qcom_wcnss.c remoteproc: qcom_wcnss: Use devm_rproc_alloc() helper 2024-03-05 20:00:04 -08:00
qcom_wcnss.h
rcar_rproc.c
remoteproc_cdev.c
remoteproc_core.c remoteproc: Make rproc_get_by_phandle() work for clusters 2024-02-06 13:48:09 -08:00
remoteproc_coredump.c
remoteproc_debugfs.c
remoteproc_elf_helpers.h
remoteproc_elf_loader.c
remoteproc_internal.h remoteproc: Make rproc_class constant 2024-03-26 11:24:38 -06:00
remoteproc_sysfs.c remoteproc: Make rproc_class constant 2024-03-26 11:24:38 -06:00
remoteproc_virtio.c remoteproc: virtio: Fix wdg cannot recovery remote processor 2024-01-22 15:47:47 -07:00
st_remoteproc.c remoteproc: st: Use devm_rproc_alloc() helper 2024-02-02 11:36:27 -07:00
st_slim_rproc.c
stm32_rproc.c remoteproc: stm32: Use devm_rproc_alloc() helper 2024-02-02 11:39:05 -07:00
ti_k3_dsp_remoteproc.c remoteproc: k3-dsp: Use devm_rproc_add() helper 2024-02-05 13:37:21 -07:00
ti_k3_r5_remoteproc.c remoteproc: k3-r5: Jump to error handling labels in start/stop errors 2024-05-06 13:34:12 -06:00
ti_sci_proc.h
wkup_m3_rproc.c
xlnx_r5_remoteproc.c drivers: remoteproc: xlnx: Fix uninitialized tcm mode 2024-04-24 15:19:38 -06:00