aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinaro CI <ci_notify@linaro.org>2020-04-14 10:25:07 +0000
committerLinaro CI <ci_notify@linaro.org>2020-04-14 10:25:07 +0000
commit4efa46792a0bac6c1a6ed071e21489d77aea8a85 (patch)
tree78cdb338f6394fe39bb8d271a93c44f59dbf8ec6
parent474afe112f19e53d99ee9c11ee25c4f845e3a134 (diff)
parent30db1a4981af4735cb5222faf882b04fde41b3e0 (diff)
Merge remote-tracking branch 'remoteproc/tracking-qcomlt-remoteproc' into integration-linux-qcomltintegration-linux-qcomlt-20200419-221336-v5.7-rc1-80-g4efa46792a0ba
-rw-r--r--Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt6
-rw-r--r--arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi6
-rw-r--r--arch/arm64/boot/dts/qcom/msm8916.dtsi2
-rw-r--r--drivers/remoteproc/qcom_wcnss.c15
4 files changed, 27 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
index d420f84ddfb0..00844a5d2ccf 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:
- vddcx-supply:
- vddpx-supply:
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 06aab44d798c..82e14cf08d8a 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -494,6 +494,7 @@
wcnss@a21b000 {
status = "okay";
+ firmware-name = "qcom/msm8916/wcnss.mdt";
};
};
@@ -538,6 +539,11 @@
};
};
+&mpss {
+ status = "okay";
+ firmware-name = "qcom/msm8916/mba.mbn", "qcom/msm8916/modem.mdt";
+};
+
&spmi_bus {
pm8916_0: pm8916@0 {
pon@800 {
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index a88a15f2352b..a4cc5efc2ed8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1079,7 +1079,7 @@
};
- hexagon@4080000 {
+ mpss: remoteproc@4080000 {
compatible = "qcom,q6v5-pil";
reg = <0x04080000 0x100>,
<0x04020000 0x040>;
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 0c7afd038f0d..71753a8e5ee3 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -84,6 +84,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;
@@ -138,6 +139,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);
}
@@ -213,6 +215,10 @@ static int wcnss_start(struct rproc *rproc)
struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv;
int ret;
+ /* 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");
@@ -457,6 +463,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;
@@ -474,8 +481,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;
@@ -488,6 +500,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);