2ddf29a
From: Rob Herring <rob.herring at calxeda.com>
2ddf29a
2ddf29a
PL310 errata work-arounds using .set_debug function are only needed on
2ddf29a
r3p0 and earlier, so check the rev and only set .set_debug on older revs.
2ddf29a
2ddf29a
Avoiding debug register accesses fixes aborts on non-secure platforms
2ddf29a
like highbank. It is assumed that non-secure platforms needing these
2ddf29a
work-arounds have already implemented .set_debug with secure monitor
2ddf29a
calls.
2ddf29a
2ddf29a
Signed-off-by: Rob Herring <rob.herring at calxeda.com>
2ddf29a
---
2ddf29a
 arch/arm/mm/cache-l2x0.c |    3 ++-
2ddf29a
 1 file changed, 2 insertions(+), 1 deletion(-)
2ddf29a
2ddf29a
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
2ddf29a
index 8a97e64..6cf2fd1 100644
2ddf29a
--- a/arch/arm/mm/cache-l2x0.c
2ddf29a
+++ b/arch/arm/mm/cache-l2x0.c
2ddf29a
@@ -334,7 +334,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
2ddf29a
 		/* Unmapped register. */
2ddf29a
 		sync_reg_offset = L2X0_DUMMY_REG;
2ddf29a
 #endif
2ddf29a
-		outer_cache.set_debug = pl310_set_debug;
2ddf29a
+		if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0)
2ddf29a
+			outer_cache.set_debug = pl310_set_debug;
2ddf29a
 		break;
2ddf29a
 	case L2X0_CACHE_ID_PART_L210:
2ddf29a
 		ways = (aux >> 13) & 0xf;
2ddf29a
-- 
2ddf29a
1.7.10.4