Commit 5f603761c3de00423cad405e064cd2fc822feab1

Authored by Praveen Rao
Committed by Tom Rini
1 parent 49ec949091

ARM: DRA7 / OMAP5: Add workaround for ARM errata 798870

This patch enables the workaround for ARM errata 798870 for OMAP5 /
DRA7 which says "If back-to-back speculative cache line fills (fill
A and fill B) are issued from the L1 data cache of a CPU to the
L2 cache, the second request (fill B) is then cancelled, and the
second request would have detected a hazard against a recent write or
eviction (write B) to the same cache line as fill B then the L2 logic
might deadlock."

An l2auxctlr accessor implementation for OMAP5 and DRA7 is introduced
here as well.

Signed-off-by: Praveen Rao <prao@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Matt Porter <mporter@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

Showing 3 changed files with 13 additions and 0 deletions Side-by-side Diff

arch/arm/cpu/armv7/omap5/hwinit.c
... ... @@ -381,4 +381,11 @@
381 381 rst_val |= rst_time;
382 382 writel(rst_val, (*prcm)->prm_rsttime);
383 383 }
  384 +
  385 +void v7_arch_cp15_set_l2aux_ctrl(u32 l2auxctrl, u32 cpu_midr,
  386 + u32 cpu_rev_comb, u32 cpu_variant,
  387 + u32 cpu_rev)
  388 +{
  389 + omap_smc1(OMAP5_SERVICE_L2ACTLR_SET, l2auxctrl);
  390 +}
arch/arm/include/asm/arch-omap5/sys_proto.h
... ... @@ -66,5 +66,8 @@
66 66 {
67 67 return div_round_up(32768 * usec, 1000000);
68 68 }
  69 +
  70 +#define OMAP5_SERVICE_L2ACTLR_SET 0x104
  71 +
69 72 #endif
include/configs/ti_omap5_common.h
... ... @@ -21,6 +21,9 @@
21 21 #define CONFIG_DISPLAY_BOARDINFO
22 22 #define CONFIG_ARCH_CPU_INIT
23 23  
  24 +/* Common ARM Erratas */
  25 +#define CONFIG_ARM_ERRATA_798870
  26 +
24 27 #define CONFIG_SYS_CACHELINE_SIZE 64
25 28  
26 29 /* Use General purpose timer 1 */