Commit b8631ab1 authored by Mathieu Poirier's avatar Mathieu Poirier Committed by Bjorn Andersson

remoteproc: stm32: Request IRQ with platform device

Request IRQ with platform device rather than remote proc in order to
call stm32_rproc_parse_dt() before rproc_alloc().  That way we can
know whether we need to synchronise with the MCU or not.
Acked-by: default avatarArnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: default avatarLoic Pallardy <loic.pallardy@st.com>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200714200445.1427257-3-mathieu.poirier@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 7b9f18ca
...@@ -262,7 +262,8 @@ static int stm32_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) ...@@ -262,7 +262,8 @@ static int stm32_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
static irqreturn_t stm32_rproc_wdg(int irq, void *data) static irqreturn_t stm32_rproc_wdg(int irq, void *data)
{ {
struct rproc *rproc = data; struct platform_device *pdev = data;
struct rproc *rproc = platform_get_drvdata(pdev);
rproc_report_crash(rproc, RPROC_WATCHDOG); rproc_report_crash(rproc, RPROC_WATCHDOG);
...@@ -554,7 +555,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev) ...@@ -554,7 +555,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev)
if (irq > 0) { if (irq > 0) {
err = devm_request_irq(dev, irq, stm32_rproc_wdg, 0, err = devm_request_irq(dev, irq, stm32_rproc_wdg, 0,
dev_name(dev), rproc); dev_name(dev), pdev);
if (err) { if (err) {
dev_err(dev, "failed to request wdg irq\n"); dev_err(dev, "failed to request wdg irq\n");
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment