aboutsummaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_q6v5_pas.c
diff options
context:
space:
mode:
authorSibi Sankar <sibis@codeaurora.org>2019-01-15 01:20:01 +0530
committerBjorn Andersson <bjorn.andersson@linaro.org>2019-01-29 22:01:07 -0800
commita5a4e02d083d88d7c8b9716c30eb42d6d5b0b1cc (patch)
tree84748ee81bfe31fe8f8fb6ccd162fc418f7964b7 /drivers/remoteproc/qcom_q6v5_pas.c
parent4107102d60791d04b2ecf6e6d78bfc53ea6e8db3 (diff)
downloadlinux-a5a4e02d083d88d7c8b9716c30eb42d6d5b0b1cc.tar.gz
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.c9
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;