diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-03-12 01:22:51 +0100 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-07-28 21:57:30 +0200 |
commit | 1fcef985c8bdd542c43da0d87bd9d51980c3859b (patch) | |
tree | 16a3d732f1ae2a2b89a252a06f4d274868f04053 /drivers/remoteproc/qcom_wcnss.h | |
parent | Linux 5.14-rc1 (diff) | |
download | linux-1fcef985c8bdd542c43da0d87bd9d51980c3859b.tar.xz linux-1fcef985c8bdd542c43da0d87bd9d51980c3859b.zip |
remoteproc: qcom: wcnss: Fix race with iris probe
The remoteproc driver is split between the responsibilities of getting
the SoC-internal ARM core up and running and the external RF (aka
"Iris") part configured.
In order to satisfy the regulator framework's need of a struct device *
to look up supplies this was implemented as two different drivers, using
of_platform_populate() in the remoteproc part to probe the iris part.
Unfortunately it's possible that the iris part probe defers on yet not
available regulators and an attempt to start the remoteproc will have to
be rejected, until this has been resolved. But there's no useful
mechanism of knowing when this would be.
Instead replace the of_platform_populate() and the iris probe with a
function that rolls its own struct device, with the relevant of_node
associated that is enough to acquire regulators and clocks specified in
the DT node and that may propagate the EPROBE_DEFER back to the wcnss
device's probe.
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reported-by: Anibal Limon <anibal.limon@linaro.org>
Reported-by: Loic Poulain <loic.poulain@linaro.org>
Tested-by: Anibal Limon <anibal.limon@linaro.org>
Link: https://lore.kernel.org/r/20210312002251.3273013-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_wcnss.h')
-rw-r--r-- | drivers/remoteproc/qcom_wcnss.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/remoteproc/qcom_wcnss.h b/drivers/remoteproc/qcom_wcnss.h index 62c8682d0a92..6d01ee6afa7f 100644 --- a/drivers/remoteproc/qcom_wcnss.h +++ b/drivers/remoteproc/qcom_wcnss.h @@ -17,9 +17,9 @@ struct wcnss_vreg_info { bool super_turbo; }; +struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo); +void qcom_iris_remove(struct qcom_iris *iris); int qcom_iris_enable(struct qcom_iris *iris); void qcom_iris_disable(struct qcom_iris *iris); -void qcom_wcnss_assign_iris(struct qcom_wcnss *wcnss, struct qcom_iris *iris, bool use_48mhz_xo); - #endif |