summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2021-04-07 17:56:40 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-04-13 22:43:26 +0200
commit1fe72bcfac087dba5ab52778e0646ed9e145cd32 (patch)
treecf349cbca5e9613d462c8536da70ecf338b4600d /drivers/remoteproc
parentremoteproc: pru: Fixup interrupt-parent logic for fw events (diff)
downloadlinux-1fe72bcfac087dba5ab52778e0646ed9e145cd32.tar.xz
linux-1fe72bcfac087dba5ab52778e0646ed9e145cd32.zip
remoteproc: pru: Fix wrong success return value for fw events
The irq_create_fwspec_mapping() returns a proper virq value on success and 0 upon any failure. The pru_handle_intrmap() treats this as an error and disposes all firmware event mappings correctly, but is returning this incorrect value as is, letting the pru_rproc_start() interpret it as a success and boot the PRU. Fix this by returning an error value back upon any such failure. While at this, revise the error trace to print some meaningful info about the failed event. Fixes: c75c9fdac66e ("remoteproc: pru: Add support for PRU specific interrupt configuration") Signed-off-by: Suman Anna <s-anna@ti.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20210407155641.5501-3-s-anna@ti.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/pru_rproc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
index b8b3c1921fe6..ac6348cc094f 100644
--- a/drivers/remoteproc/pru_rproc.c
+++ b/drivers/remoteproc/pru_rproc.c
@@ -339,8 +339,10 @@ static int pru_handle_intrmap(struct rproc *rproc)
pru->mapped_irq[i] = irq_create_fwspec_mapping(&fwspec);
if (!pru->mapped_irq[i]) {
- dev_err(dev, "failed to get virq\n");
- ret = pru->mapped_irq[i];
+ dev_err(dev, "failed to get virq for fw mapping %d: event %d chnl %d host %d\n",
+ i, fwspec.param[0], fwspec.param[1],
+ fwspec.param[2]);
+ ret = -EINVAL;
goto map_fail;
}
}