diff options
author | Linaro CI <ci_notify@linaro.org> | 2021-02-22 13:20:20 +0000 |
---|---|---|
committer | Linaro CI <ci_notify@linaro.org> | 2021-02-22 13:20:20 +0000 |
commit | 0cec080343dc46725f00d4783a0a3b804f1577bf (patch) | |
tree | 2bf73774401593a1388380aac6aec7df9110ba65 | |
parent | 20a2bb3d236e16cdd32625d1651475451d8846f3 (diff) | |
parent | 43cf198db3d84e3e2b4ff25631db1d2815de6f0f (diff) |
Merge remote-tracking branch 'remoteproc/tracking-qcomlt-remoteproc' into integration-linux-qcomlt
# Conflicts:
# Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
-rw-r--r-- | Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt | 6 | ||||
-rw-r--r-- | arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 6 | ||||
-rw-r--r-- | drivers/remoteproc/qcom_wcnss.c | 15 |
3 files changed, 26 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt index cc0b7fc1c29b..64e0a79e7934 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt +++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt @@ -34,6 +34,12 @@ on the Qualcomm WCNSS core. Definition: should be "wdog", "fatal", optionally followed by "ready", "handover", "stop-ack" +- firmware-name: + Usage: optional + Value type: <string> + Definition: must list the relative firmware image path for the + WCNSS core. + - vddmx-supply: (deprecated for qcom,pronto-v1/2-pil) - vddcx-supply: (deprecated for qcom,pronto-v1/2-pil) - vddpx-supply: diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index 3a9538e1ec97..43677c529388 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -301,6 +301,11 @@ status = "okay"; }; +&mpss { + status = "okay"; + firmware-name = "qcom/msm8916/mba.mbn", "qcom/msm8916/modem.mdt"; +}; + &pm8916_resin { status = "okay"; linux,code = <KEY_VOLUMEDOWN>; @@ -308,6 +313,7 @@ &pronto { status = "okay"; + firmware-name = "qcom/msm8916/wcnss.mdt"; }; &sdhc_1 { diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index f95854255c70..a443e3fec54e 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -92,6 +92,7 @@ struct qcom_wcnss { struct completion start_done; struct completion stop_done; + struct completion iris_assigned; phys_addr_t mem_phys; phys_addr_t mem_reloc; @@ -150,6 +151,7 @@ void qcom_wcnss_assign_iris(struct qcom_wcnss *wcnss, wcnss->iris = iris; wcnss->use_48mhz_xo = use_48mhz_xo; + complete(&wcnss->iris_assigned); mutex_unlock(&wcnss->iris_lock); } @@ -232,6 +234,10 @@ static int wcnss_start(struct rproc *rproc) struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int ret, i; + /* Grant some time for iris registration */ + wait_for_completion_timeout(&wcnss->iris_assigned, + msecs_to_jiffies(5000)); + mutex_lock(&wcnss->iris_lock); if (!wcnss->iris) { dev_err(wcnss->dev, "no iris registered\n"); @@ -530,6 +536,7 @@ static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss) static int wcnss_probe(struct platform_device *pdev) { + const char *fw_name = WCNSS_FIRMWARE_NAME; const struct wcnss_data *data; struct qcom_wcnss *wcnss; struct resource *res; @@ -547,8 +554,13 @@ static int wcnss_probe(struct platform_device *pdev) return -ENXIO; } + 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, &wcnss_ops, - WCNSS_FIRMWARE_NAME, sizeof(*wcnss)); + fw_name, sizeof(*wcnss)); if (!rproc) { dev_err(&pdev->dev, "unable to allocate remoteproc\n"); return -ENOMEM; @@ -562,6 +574,7 @@ static int wcnss_probe(struct platform_device *pdev) init_completion(&wcnss->start_done); init_completion(&wcnss->stop_done); + init_completion(&wcnss->iris_assigned); mutex_init(&wcnss->iris_lock); |