]> git.ipfire.org Git - people/arne_f/kernel.git/commit
remoteproc: qcom: wcnss: Fix race with iris probe
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 12 Mar 2021 00:22:51 +0000 (16:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:39:24 +0000 (12:39 +0200)
commit28fd51c1322729003f6ff1ae41442d0ece7ad395
tree05bc811ee17668b5db0fb02779c347d3c1710bef
parent65fa28b7695fc6c5f71b3574e1a6c8373f8ca433
remoteproc: qcom: wcnss: Fix race with iris probe

[ Upstream commit 1fcef985c8bdd542c43da0d87bd9d51980c3859b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/remoteproc/qcom_wcnss.c
drivers/remoteproc/qcom_wcnss.h
drivers/remoteproc/qcom_wcnss_iris.c