linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mach-ux500: cache operations are atomic on PL310
@ 2012-01-12  5:37 Srinidhi KASAGAR
  2012-01-12  5:37 ` [PATCH 2/2] mach-ux500: enable ARM errata 764369 Srinidhi KASAGAR
  2012-01-13 18:14 ` [PATCH 1/2] mach-ux500: cache operations are atomic on PL310 Will Deacon
  0 siblings, 2 replies; 11+ messages in thread
From: Srinidhi KASAGAR @ 2012-01-12  5:37 UTC (permalink / raw)
  To: linux-arm-kernel

Apply ERRATA_753970 for ux500 variant of cache sync too

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-ux500/cache-l2x0.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index 122ddde..8aaa21a 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -12,7 +12,7 @@
 
 static void __iomem *l2x0_base;
 
-static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask)
+static inline void ux500_cache_wait_way(void __iomem *reg, unsigned long mask)
 {
 	/* wait for the operation to complete */
 	while (readl_relaxed(reg) & mask)
@@ -21,8 +21,13 @@ static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask)
 
 static inline void ux500_cache_sync(void)
 {
+#ifdef CONFIG_ARM_ERRATA_753970
+	/* write to an unmmapped register */
+	writel_relaxed(0, l2x0_base + L2X0_DUMMY_REG);
+#else
 	writel_relaxed(0, l2x0_base + L2X0_CACHE_SYNC);
-	ux500_cache_wait(l2x0_base + L2X0_CACHE_SYNC, 1);
+#endif
+	/* cache operations by line are atomic in PL310 */
 }
 
 /*
@@ -46,7 +51,7 @@ static void ux500_l2x0_inv_all(void)
 
 	/* invalidate all ways */
 	writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
-	ux500_cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
+	ux500_cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
 	ux500_cache_sync();
 }
 
-- 
1.7.4.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-03-07  9:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12  5:37 [PATCH 1/2] mach-ux500: cache operations are atomic on PL310 Srinidhi KASAGAR
2012-01-12  5:37 ` [PATCH 2/2] mach-ux500: enable ARM errata 764369 Srinidhi KASAGAR
2012-01-13 18:14 ` [PATCH 1/2] mach-ux500: cache operations are atomic on PL310 Will Deacon
2012-01-16 11:05   ` Srinidhi KASAGAR
2012-01-16 14:50     ` Will Deacon
2012-01-17  6:22       ` Srinidhi KASAGAR
2012-01-17 10:30         ` Will Deacon
2012-01-17 11:27           ` Srinidhi KASAGAR
2012-01-17 13:34             ` Will Deacon
2012-01-18 12:06               ` Linus Walleij
2012-03-07  9:32               ` Srinidhi Kasagar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).