diff options
author | Daniel Baluta <daniel.baluta@nxp.com> | 2022-03-31 13:32:37 +0300 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2022-04-13 11:59:43 -0600 |
commit | 79a43db93399cfc7825a908a03320677c52ef919 (patch) | |
tree | cdac601600ff6752a9aaf53386ee4887d85a1870 /drivers/remoteproc | |
parent | c7457143668a98e5ddb0ab92d1c61d8899f7ac74 (diff) |
remoteproc: imx_dsp_rproc: Make rsc_table optional
There are cases when we want to test a simple "hello world"
app on the DSP and we do not need a resource table.
remoteproc core allows us having an optional rsc_table.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220331103237.340796-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/imx_dsp_rproc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index eee3c44c2146..ca0817f8e41e 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -709,6 +709,14 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid) dev_err(dev, "%s: failed (%d, err:%d)\n", __func__, vqid, err); } +static int imx_dsp_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + if (rproc_elf_load_rsc_table(rproc, fw)) + dev_warn(&rproc->dev, "no resource table found for this firmware\n"); + + return 0; +} + static const struct rproc_ops imx_dsp_rproc_ops = { .prepare = imx_dsp_rproc_prepare, .unprepare = imx_dsp_rproc_unprepare, @@ -716,7 +724,7 @@ static const struct rproc_ops imx_dsp_rproc_ops = { .stop = imx_dsp_rproc_stop, .kick = imx_dsp_rproc_kick, .load = rproc_elf_load_segments, - .parse_fw = rproc_elf_load_rsc_table, + .parse_fw = imx_dsp_rproc_parse_fw, .sanity_check = rproc_elf_sanity_check, .get_boot_addr = rproc_elf_get_boot_addr, }; |