Skip to content

Commit 79a43db

Browse files
dbalutamathieupoirier
authored andcommitted
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 <[email protected]> Acked-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent c745714 commit 79a43db

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/remoteproc/imx_dsp_rproc.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,14 +709,22 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid)
709709
dev_err(dev, "%s: failed (%d, err:%d)\n", __func__, vqid, err);
710710
}
711711

712+
static int imx_dsp_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
713+
{
714+
if (rproc_elf_load_rsc_table(rproc, fw))
715+
dev_warn(&rproc->dev, "no resource table found for this firmware\n");
716+
717+
return 0;
718+
}
719+
712720
static const struct rproc_ops imx_dsp_rproc_ops = {
713721
.prepare = imx_dsp_rproc_prepare,
714722
.unprepare = imx_dsp_rproc_unprepare,
715723
.start = imx_dsp_rproc_start,
716724
.stop = imx_dsp_rproc_stop,
717725
.kick = imx_dsp_rproc_kick,
718726
.load = rproc_elf_load_segments,
719-
.parse_fw = rproc_elf_load_rsc_table,
727+
.parse_fw = imx_dsp_rproc_parse_fw,
720728
.sanity_check = rproc_elf_sanity_check,
721729
.get_boot_addr = rproc_elf_get_boot_addr,
722730
};

0 commit comments

Comments
 (0)