Commit graph

10 commits

Author SHA1 Message Date
Bjorn Andersson
b90fcfcb13 remoteproc: qcom: wcnss: Make SMD handling common
Move the SMD edge handling to the Qualcomm common file to make it
reusable for other Qualcomm remoteproc drivers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-02-06 08:57:25 -08:00
Bjorn Andersson
2aad40d911 remoteproc: Move qcom_mdt_loader into drivers/soc/qcom
With the remoteproc parts cleaned out of the MDT loader we can move it
to drivers/soc/qcom.

Acked-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-02-06 08:57:25 -08:00
Bjorn Andersson
7f0dd07a9b remoteproc: qcom: mdt_loader: Refactor MDT loader
Pushing the SCM calls into the MDT loader reduces duplication in the
callers and allows for non-remoteproc clients to use the helper for
parsing and loading MDT files.

Cc: Andy Gross <andy.gross@linaro.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-02-06 08:57:24 -08:00
Bjorn Andersson
bde440eee2 remoteproc: qcom: Extract non-mdt related helper
In preparation for moving the mdt loader out of remoteproc let's move
the somewhat unrelated resource table dummy helper to a Qualcomm
"common" file.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-02-06 08:57:24 -08:00
Bjorn Andersson
6de1a507c4 remoteproc: qcom_wcnss: Fix circular module dependency
The tie between the main WCNSS driver and the IRIS driver causes a
circular dependency between the two modules. Neither part makes sense to
have on their own so lets merge them into one module.

For the sake of picking up the clock and regulator resources described
in the iris of_node we need an associated struct device. But, to keep
the size of the patch down we continue to represent the IRIS part as its
own platform_driver, within the same module, rather than setting up a
dummy device.

Fixes: aed361adca ("remoteproc: qcom: Introduce WCNSS peripheral image loader")
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-11-14 21:52:19 -08:00
Bjorn Andersson
5a856bc63c remoteproc: wcnss: Bond SMD edge to remoteproc
Allow the wcnss smd edge to be described as a child of the wcnss
remoteproc node and make the edge life cycle follow the running state of
the remoteproc.

This bond is necessary to clean up the smd state when the remote
processor is suddenly removed, and in some cases even when it shut down
in a controlled fasion.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-11-14 21:52:14 -08:00
Javier Martinez Canillas
4958aabb0c remoteproc: qcom: wcnss: Fix module autoload
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/remoteproc/qcom_wcnss.ko | grep alias
$

After this patch:

$ modinfo drivers/remoteproc/qcom_wcnss.ko | grep alias
alias:          of:N*T*Cqcom,pronto-v2-pilC*
alias:          of:N*T*Cqcom,pronto-v2-pil
alias:          of:N*T*Cqcom,pronto-v1-pilC*
alias:          of:N*T*Cqcom,pronto-v1-pil
alias:          of:N*T*Cqcom,riva-pilC*
alias:          of:N*T*Cqcom,riva-pil

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-10-18 15:18:12 -07:00
Bjorn Andersson
433c0e04bc remoteproc: Split driver and consumer dereferencing
In order to be able to lock a rproc driver implementations only when
used by a client, we must differ between the dereference operation of a
client and the implementation itself.

This patch brings no functional change.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-10-02 22:50:21 -07:00
Wei Yongjun
f4e1f9bb34 remoteproc: qcom: wcnss: Fix return value check in wcnss_probe()
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-08-22 21:36:43 -07:00
Bjorn Andersson
aed361adca remoteproc: qcom: Introduce WCNSS peripheral image loader
This introduces the peripheral image loader, for loading WCNSS firmware
and boot the core on e.g. MSM8974. The firmware is verified and booted
with the help of the Peripheral Authentication System (PAS) in
TrustZone.

Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-08-18 12:48:46 -07:00