summaryrefslogtreecommitdiff
path: root/drivers/iommu/arm/arm-smmu/arm-smmu.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2020-10-19 21:23:21 +0300
committerWill Deacon <will@kernel.org>2020-10-29 21:12:10 +0300
commit56b75b51ed6d5e7bffda59440404409bca2dff00 (patch)
tree854c99426a880fe760fff24e109274978ccb9a69 /drivers/iommu/arm/arm-smmu/arm-smmu.h
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff)
downloadlinux-56b75b51ed6d5e7bffda59440404409bca2dff00.tar.xz
iommu/arm-smmu: Allow implementation specific write_s2cr
The firmware found in some Qualcomm platforms intercepts writes to the S2CR register in order to replace the BYPASS type with FAULT. Further more it treats faults at this level as catastrophic and restarts the device. Add support for providing implementation specific versions of the S2CR write function, to allow the Qualcomm driver to work around this behavior. Cc: <stable@vger.kernel.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Steev Klimaszewski <steev@kali.org> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/20201019182323.3162386-2-bjorn.andersson@linaro.org Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/iommu/arm/arm-smmu/arm-smmu.h')
-rw-r--r--drivers/iommu/arm/arm-smmu/arm-smmu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h
index 1a746476927c..b71647eaa319 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.h
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h
@@ -436,6 +436,7 @@ struct arm_smmu_impl {
int (*alloc_context_bank)(struct arm_smmu_domain *smmu_domain,
struct arm_smmu_device *smmu,
struct device *dev, int start);
+ void (*write_s2cr)(struct arm_smmu_device *smmu, int idx);
};
#define INVALID_SMENDX -1