ARM: 6411/1: vexpress: set RAM latencies to 1 cycle for PL310 on ct-ca9x4 tile

The PL310 on the ct-ca9x4 tile for the Versatile Express does not need
to add additional latency when accessing its cache RAMs. Unfortunately,
the boot monitor sets this up for an 8-cycle delay on reads and writes,
resulting in greatly reduced memory performance when the L2 cache is
enabled.

This patch sets the L2 RAM latencies to the correct value of 1 cycle
on the ct-ca9x4 tile before enabling the L2 cache.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Will Deacon and committed by Russell King 2de59fea 2de5c00a

+7 -1
+7 -1
arch/arm/mach-vexpress/ct-ca9x4.c
··· 227 227 int i; 228 228 229 229 #ifdef CONFIG_CACHE_L2X0 230 - l2x0_init(MMIO_P2V(CT_CA9X4_L2CC), 0x00400000, 0xfe0fffff); 230 + void __iomem *l2x0_base = MMIO_P2V(CT_CA9X4_L2CC); 231 + 232 + /* set RAM latencies to 1 cycle for this core tile. */ 233 + writel(0, l2x0_base + L2X0_TAG_LATENCY_CTRL); 234 + writel(0, l2x0_base + L2X0_DATA_LATENCY_CTRL); 235 + 236 + l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); 231 237 #endif 232 238 233 239 clkdev_add_table(lookups, ARRAY_SIZE(lookups));