#define ARM_SMMU_CB(smmu, n)           ((n) * (1 << (smmu)->pgshift))
 
 #define ARM_SMMU_CB_SCTLR              0x0
+#define ARM_SMMU_CB_ACTLR              0x4
 #define ARM_SMMU_CB_RESUME             0x8
 #define ARM_SMMU_CB_TTBCR2             0x10
 #define ARM_SMMU_CB_TTBR0              0x20
 #define SCTLR_M                                (1 << 0)
 #define SCTLR_EAE_SBOP                 (SCTLR_AFE | SCTLR_TRE)
 
+#define ARM_MMU500_ACTLR_CPRE          (1 << 1)
+
 #define CB_PAR_F                       (1 << 0)
 
 #define ATSR_ACTIVE                    (1 << 0)
 
 enum arm_smmu_implementation {
        GENERIC_SMMU,
+       ARM_MMU500,
        CAVIUM_SMMUV2,
 };
 
                cb_base = ARM_SMMU_CB_BASE(smmu) + ARM_SMMU_CB(smmu, i);
                writel_relaxed(0, cb_base + ARM_SMMU_CB_SCTLR);
                writel_relaxed(FSR_FAULT, cb_base + ARM_SMMU_CB_FSR);
+               /*
+                * Disable MMU-500's not-particularly-beneficial next-page
+                * prefetcher for the sake of errata #841119 and #826419.
+                */
+               if (smmu->model == ARM_MMU500) {
+                       reg = readl_relaxed(cb_base + ARM_SMMU_CB_ACTLR);
+                       reg &= ~ARM_MMU500_ACTLR_CPRE;
+                       writel_relaxed(reg, cb_base + ARM_SMMU_CB_ACTLR);
+               }
        }
 
        /* Invalidate the TLB, just in case */
 
 ARM_SMMU_MATCH_DATA(smmu_generic_v1, ARM_SMMU_V1, GENERIC_SMMU);
 ARM_SMMU_MATCH_DATA(smmu_generic_v2, ARM_SMMU_V2, GENERIC_SMMU);
+ARM_SMMU_MATCH_DATA(arm_mmu500, ARM_SMMU_V2, ARM_MMU500);
 ARM_SMMU_MATCH_DATA(cavium_smmuv2, ARM_SMMU_V2, CAVIUM_SMMUV2);
 
 static const struct of_device_id arm_smmu_of_match[] = {
        { .compatible = "arm,smmu-v2", .data = &smmu_generic_v2 },
        { .compatible = "arm,mmu-400", .data = &smmu_generic_v1 },
        { .compatible = "arm,mmu-401", .data = &smmu_generic_v1 },
-       { .compatible = "arm,mmu-500", .data = &smmu_generic_v2 },
+       { .compatible = "arm,mmu-500", .data = &arm_mmu500 },
        { .compatible = "cavium,smmu-v2", .data = &cavium_smmuv2 },
        { },
 };