|
@@ -32,6 +32,7 @@ static void __iomem *l2x0_base;
|
|
static DEFINE_RAW_SPINLOCK(l2x0_lock);
|
|
static DEFINE_RAW_SPINLOCK(l2x0_lock);
|
|
static u32 l2x0_way_mask; /* Bitmask of active ways */
|
|
static u32 l2x0_way_mask; /* Bitmask of active ways */
|
|
static u32 l2x0_size;
|
|
static u32 l2x0_size;
|
|
|
|
+static unsigned long sync_reg_offset = L2X0_CACHE_SYNC;
|
|
|
|
|
|
struct l2x0_regs l2x0_saved_regs;
|
|
struct l2x0_regs l2x0_saved_regs;
|
|
|
|
|
|
@@ -61,12 +62,7 @@ static inline void cache_sync(void)
|
|
{
|
|
{
|
|
void __iomem *base = l2x0_base;
|
|
void __iomem *base = l2x0_base;
|
|
|
|
|
|
-#ifdef CONFIG_PL310_ERRATA_753970
|
|
|
|
- /* write to an unmmapped register */
|
|
|
|
- writel_relaxed(0, base + L2X0_DUMMY_REG);
|
|
|
|
-#else
|
|
|
|
- writel_relaxed(0, base + L2X0_CACHE_SYNC);
|
|
|
|
-#endif
|
|
|
|
|
|
+ writel_relaxed(0, base + sync_reg_offset);
|
|
cache_wait(base + L2X0_CACHE_SYNC, 1);
|
|
cache_wait(base + L2X0_CACHE_SYNC, 1);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -331,6 +327,10 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
|
|
else
|
|
else
|
|
ways = 8;
|
|
ways = 8;
|
|
type = "L310";
|
|
type = "L310";
|
|
|
|
+#ifdef CONFIG_PL310_ERRATA_753970
|
|
|
|
+ /* Unmapped register. */
|
|
|
|
+ sync_reg_offset = L2X0_DUMMY_REG;
|
|
|
|
+#endif
|
|
break;
|
|
break;
|
|
case L2X0_CACHE_ID_PART_L210:
|
|
case L2X0_CACHE_ID_PART_L210:
|
|
ways = (aux >> 13) & 0xf;
|
|
ways = (aux >> 13) & 0xf;
|