diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-06-17 19:40:43 +0200 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2016-06-25 05:53:52 +0200 |
commit | dd4fe5b292226f2459305965c960d8dc39f36e0f (patch) | |
tree | 5a9ec8e6bbaa32cb2c518aad547892a48a0af58d /drivers/firmware/qcom_scm-64.c | |
parent | firmware: qcom: scm: Peripheral Authentication Service (diff) | |
download | linux-dd4fe5b292226f2459305965c960d8dc39f36e0f.tar.xz linux-dd4fe5b292226f2459305965c960d8dc39f36e0f.zip |
firmware: qcom: scm: Expose PAS command 10 as reset-controller
PAS command 10 is used to assert and deassert the MSS reset via
TrustZone, expose this as a reset-controller to mimic the direct
access case.
Cc: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/firmware/qcom_scm-64.c')
-rw-r--r-- | drivers/firmware/qcom_scm-64.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c index 3ac249037dbf..4a0f5ead4fb5 100644 --- a/drivers/firmware/qcom_scm-64.c +++ b/drivers/firmware/qcom_scm-64.c @@ -342,3 +342,19 @@ int __qcom_scm_pas_shutdown(struct device *dev, u32 peripheral) return ret ? : res.a1; } + +int __qcom_scm_pas_mss_reset(struct device *dev, bool reset) +{ + struct qcom_scm_desc desc = {0}; + struct arm_smccc_res res; + int ret; + + desc.args[0] = reset; + desc.args[1] = 0; + desc.arginfo = QCOM_SCM_ARGS(2); + + ret = qcom_scm_call(dev, QCOM_SCM_SVC_PIL, QCOM_SCM_PAS_MSS_RESET, &desc, + &res); + + return ret ? : res.a1; +} |