ARM: 6741/1: errata: pl310 cache sync operation may be faulty
[firefly-linux-kernel-4.4.55.git] / arch / arm / mm / cache-l2x0.c
index 170c9bb958666afc587e6b94c6e424f43b939a88..f2ce38e085d2198c28f496115e5f6a5cfaec87d0 100644 (file)
@@ -49,7 +49,13 @@ static inline void cache_wait(void __iomem *reg, unsigned long mask)
 static inline void cache_sync(void)
 {
        void __iomem *base = l2x0_base;
+
+#ifdef CONFIG_ARM_ERRATA_753970
+       /* write to an unmmapped register */
+       writel_relaxed(0, base + L2X0_DUMMY_REG);
+#else
        writel_relaxed(0, base + L2X0_CACHE_SYNC);
+#endif
        cache_wait(base + L2X0_CACHE_SYNC, 1);
 }