]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/iommu/arm-smmu.h
pinctrl: baytrail: Allocate IRQ chip dynamic
[linux.git] / drivers / iommu / arm-smmu.h
index b19b6cae9b5e8437c51958989d127ee0c50b16a1..62b9f0cec49bbd1edcce191777498af957762c3a 100644 (file)
@@ -79,6 +79,8 @@
 #define ID7_MINOR                      GENMASK(3, 0)
 
 #define ARM_SMMU_GR0_sGFSR             0x48
+#define sGFSR_USF                      BIT(1)
+
 #define ARM_SMMU_GR0_sGFSYNR0          0x50
 #define ARM_SMMU_GR0_sGFSYNR1          0x54
 #define ARM_SMMU_GR0_sGFSYNR2          0x58
@@ -304,17 +306,10 @@ enum arm_smmu_domain_stage {
        ARM_SMMU_DOMAIN_BYPASS,
 };
 
-struct arm_smmu_flush_ops {
-       struct iommu_flush_ops          tlb;
-       void (*tlb_inv_range)(unsigned long iova, size_t size, size_t granule,
-                             bool leaf, void *cookie);
-       void (*tlb_sync)(void *cookie);
-};
-
 struct arm_smmu_domain {
        struct arm_smmu_device          *smmu;
        struct io_pgtable_ops           *pgtbl_ops;
-       const struct arm_smmu_flush_ops *flush_ops;
+       const struct iommu_flush_ops    *flush_ops;
        struct arm_smmu_cfg             cfg;
        enum arm_smmu_domain_stage      stage;
        bool                            non_strict;
@@ -335,6 +330,8 @@ struct arm_smmu_impl {
        int (*cfg_probe)(struct arm_smmu_device *smmu);
        int (*reset)(struct arm_smmu_device *smmu);
        int (*init_context)(struct arm_smmu_domain *smmu_domain);
+       void (*tlb_sync)(struct arm_smmu_device *smmu, int page, int sync,
+                        int status);
 };
 
 static inline void __iomem *arm_smmu_page(struct arm_smmu_device *smmu, int n)
@@ -398,5 +395,8 @@ static inline void arm_smmu_writeq(struct arm_smmu_device *smmu, int page,
        arm_smmu_writeq((s), ARM_SMMU_CB((s), (n)), (o), (v))
 
 struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu);
+struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu);
+
+int arm_mmu500_reset(struct arm_smmu_device *smmu);
 
 #endif /* _ARM_SMMU_H */