diff options
author | Sibi Sankar <sibis@codeaurora.org> | 2019-01-14 22:50:01 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2019-01-30 09:01:07 +0300 |
commit | a5a4e02d083d88d7c8b9716c30eb42d6d5b0b1cc (patch) | |
tree | 84748ee81bfe31fe8f8fb6ccd162fc418f7964b7 /drivers/remoteproc/qcom_q6v5_pas.c | |
parent | 4107102d60791d04b2ecf6e6d78bfc53ea6e8db3 (diff) | |
download | linux-a5a4e02d083d88d7c8b9716c30eb42d6d5b0b1cc.tar.xz |
remoteproc: qcom: Add support for parsing fw dt bindings
Add support for parsing "firmware-name" dt bindings which specifies
the relative paths of mba/modem/pas image as strings. Fallback to
the default paths for mba/modem/pas image on -EINVAL.
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_q6v5_pas.c')
-rw-r--r-- | drivers/remoteproc/qcom_q6v5_pas.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index c529a04c14ed..f280f196d007 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -258,6 +258,7 @@ static int adsp_probe(struct platform_device *pdev) const struct adsp_data *desc; struct qcom_adsp *adsp; struct rproc *rproc; + const char *fw_name; int ret; desc = of_device_get_match_data(&pdev->dev); @@ -267,8 +268,14 @@ static int adsp_probe(struct platform_device *pdev) if (!qcom_scm_is_available()) return -EPROBE_DEFER; + fw_name = desc->firmware_name; + ret = of_property_read_string(pdev->dev.of_node, "firmware-name", + &fw_name); + if (ret < 0 && ret != -EINVAL) + return ret; + rproc = rproc_alloc(&pdev->dev, pdev->name, &adsp_ops, - desc->firmware_name, sizeof(*adsp)); + fw_name, sizeof(*adsp)); if (!rproc) { dev_err(&pdev->dev, "unable to allocate remoteproc\n"); return -ENOMEM; |