diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-15 12:48:18 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-05-29 19:48:17 -0400 |
commit | 99ca1772e52d8825172100a24e461a0ffe11e125 (patch) | |
tree | 7c092ae26cc3f96fc5e5a5a15bc192fbbac44a38 /arch/arm/mm | |
parent | 6a28cf59ff1144398d9d32d409ed8cbf1215922d (diff) |
ARM: l2c: implement L2C-310 erratum 727915 as a method override
Implement L2C-310 erratum 727915 by overriding the flush_all method
in the outer_cache operations structure. This allows us to sensibly
contain the erratum code in one place without affecting other
locations or implementations.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index d07fa4fc95a3..6161232c8a85 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -522,6 +522,19 @@ static void l2c310_set_debug(unsigned long val) | |||
522 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); | 522 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); |
523 | } | 523 | } |
524 | 524 | ||
525 | static void l2c310_flush_all_erratum(void) | ||
526 | { | ||
527 | void __iomem *base = l2x0_base; | ||
528 | unsigned long flags; | ||
529 | |||
530 | raw_spin_lock_irqsave(&l2x0_lock, flags); | ||
531 | l2c_set_debug(base, 0x03); | ||
532 | __l2c_op_way(base + L2X0_CLEAN_INV_WAY); | ||
533 | l2c_set_debug(base, 0x00); | ||
534 | __l2c210_cache_sync(base); | ||
535 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); | ||
536 | } | ||
537 | |||
525 | static void __init l2c310_save(void __iomem *base) | 538 | static void __init l2c310_save(void __iomem *base) |
526 | { | 539 | { |
527 | unsigned revision; | 540 | unsigned revision; |
@@ -590,6 +603,13 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id, | |||
590 | if (revision <= L310_CACHE_ID_RTL_R3P0) | 603 | if (revision <= L310_CACHE_ID_RTL_R3P0) |
591 | fns->set_debug = l2c310_set_debug; | 604 | fns->set_debug = l2c310_set_debug; |
592 | 605 | ||
606 | if (IS_ENABLED(CONFIG_PL310_ERRATA_727915) && | ||
607 | revision >= L310_CACHE_ID_RTL_R2P0 && | ||
608 | revision < L310_CACHE_ID_RTL_R3P1) { | ||
609 | fns->flush_all = l2c310_flush_all_erratum; | ||
610 | errata[n++] = "727915"; | ||
611 | } | ||
612 | |||
593 | if (IS_ENABLED(CONFIG_PL310_ERRATA_753970) && | 613 | if (IS_ENABLED(CONFIG_PL310_ERRATA_753970) && |
594 | revision == L310_CACHE_ID_RTL_R3P0) { | 614 | revision == L310_CACHE_ID_RTL_R3P0) { |
595 | sync_reg_offset = L2X0_DUMMY_REG; | 615 | sync_reg_offset = L2X0_DUMMY_REG; |