diff options
author | Vivek Gautam <vivek.gautam@codeaurora.org> | 2019-09-20 13:34:28 +0530 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-11-04 17:48:37 +0000 |
commit | 5eb0e0e4f90addc6b79ebf1cb4b06b56b09f09de (patch) | |
tree | 6c66008c21ef8a2810e1a3d47cae12a4724ab244 /drivers/firmware/qcom_scm-64.c | |
parent | 1a5ea3b7a6ac6c133660b9aeda95b2087c8eec47 (diff) | |
download | linux-5eb0e0e4f90addc6b79ebf1cb4b06b56b09f09de.tar.bz2 |
firmware/qcom_scm: Add scm call to handle smmu errata
Qcom's smmu-500 needs to toggle wait-for-safe sequence to
handle TLB invalidation sync's.
Few firmwares allow doing that through SCM interface.
Add API to toggle wait for safe from firmware through a
SCM call.
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Andy Gross <agross@kernel.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/firmware/qcom_scm-64.c')
-rw-r--r-- | drivers/firmware/qcom_scm-64.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c index 872155c67b2d..e1cd933ea9ae 100644 --- a/drivers/firmware/qcom_scm-64.c +++ b/drivers/firmware/qcom_scm-64.c @@ -552,3 +552,16 @@ int __qcom_scm_io_writel(struct device *dev, phys_addr_t addr, unsigned int val) return qcom_scm_call(dev, QCOM_SCM_SVC_IO, QCOM_SCM_IO_WRITE, &desc, &res); } + +int __qcom_scm_qsmmu500_wait_safe_toggle(struct device *dev, bool en) +{ + struct qcom_scm_desc desc = {0}; + struct arm_smccc_res res; + + desc.args[0] = QCOM_SCM_CONFIG_ERRATA1_CLIENT_ALL; + desc.args[1] = en; + desc.arginfo = QCOM_SCM_ARGS(2); + + return qcom_scm_call_atomic(dev, QCOM_SCM_SVC_SMMU_PROGRAM, + QCOM_SCM_CONFIG_ERRATA1, &desc, &res); +} |