linux/arch/arm
Josh Cartwright 6ded93a119 ARM: zynq: address L2 cache data corruption
The Zynq has a bug where the L2 cache will return invalid data in some
circumstances unless the L2C_RAM register is set to 0x00020202 before the first
enabling of the L2 cache.

The Xilinx-recommended solution to this problem is to ensure that early one of
the earlier bootstages correctly initialize L2C_RAM, however, this issue wasn't
discovered and fixed until after their EDK/SDK 14.4 release.  For systems built
prior to that, and which lack field-upgradable bootloaders, this issue still
exists and silent data corruption can be seen in the wild.

Fix these systems by ensuring L2C_RAM is properly initialized at the
earliest convenient moment prior to the L2 being brought up, which is
when the SLCR is first mapped.

The Zynq bug is described in more detail by Xilinx AR# 54190 as quoted
below.

Xilinx AR# 54190
http://www.xilinx.com/support/answers/54190.htm
Captured on 2014-09-24 14:43 -0500

  = Description =
  For proper L2 cache operation, the user code must program the
  slcr.L2C_RAM register (address 0xF800_0A1C) to the value of
  0x0002_0202 before enabling the L2 cache. The reset value
  (0x0001_0101) might cause, very infrequently, the L2 cache to return
  invalid data.

  = Solution =
  It is up to the user code (FSBL or other user code) to set the
  slcr.L2C_RAM register to the value 0x0002_0202 before enabling the L2
  cache.

  Note: The L2 cache is disabled after reset and is not enabled by the
  BootROM.

  Note: The slcr.l2C_RAM register was previously reserved. It is added
  in the Zynq-7000 AP SoC Technical Reference Manual (TRM) v1.5 as
  "Reserved".

Thanks to Jaeden Amero for initial debugging and triage efforts.

Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-02-09 10:18:12 +01:00
..
boot ARM: SoC fixes for v4.5 merge window 2016-01-22 17:26:00 -08:00
common ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
configs ARM: SoC defconfig updates for v4.5 2016-01-20 18:29:13 -08:00
crypto
firmware
include Merge branch 'akpm' (patches from Andrew) 2016-01-21 12:32:08 -08:00
kernel ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
kvm kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
lib arm, thp: remove infrastructure for handling splitting PMDs 2016-01-15 17:56:32 -08:00
mach-alpine
mach-asm9260
mach-at91 ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
mach-axxia
mach-bcm Merge tag 'bcm2835-soc-next-2015-12-28' of http://github.com/anholt/linux into next/soc 2015-12-31 17:37:12 +01:00
mach-berlin
mach-clps711x gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
mach-cns3xxx
mach-davinci ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: SoC platform updates for v4.5 2016-01-20 18:10:05 -08:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: SoC platform updates for v4.5 2016-01-20 18:10:05 -08:00
mach-integrator Merge branch 'treewide/cleanup' into next/multiplatform 2015-12-18 17:07:52 +01:00
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx MTD updates for v4.5: 2016-01-13 11:25:54 -08:00
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx
mach-mediatek ARM: DT updates for v4.5 2016-01-20 18:16:29 -08:00
mach-meson
mach-mmp
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: SoC platform updates for v4.5 2016-01-20 18:10:05 -08:00
mach-omap2 More power management and ACPI updates for v4.5-rc1 2016-01-20 19:06:49 -08:00
mach-orion5x ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
mach-picoxcell
mach-prima2
mach-pxa ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
mach-qcom
mach-realview ARM: realview: fix device tree build 2016-01-21 13:16:17 +01:00
mach-rockchip Merge branch 'treewide/cleanup' into next/soc 2015-12-22 13:10:00 -08:00
mach-rpc
mach-s3c24xx ARM: s3c: simplify s3c_irqwake_{e,}intallow definition 2015-12-31 17:26:18 +01:00
mach-s3c64xx ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
mach-s5pv210
mach-sa1100 ARM: sa1100/simpad: Be sure to clamp return value 2015-12-22 14:57:50 -08:00
mach-shmobile
mach-socfpga
mach-spear
mach-sti ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
mach-stm32
mach-sunxi
mach-tango ARM: tango: Fix UP build issues 2016-01-07 06:33:41 +01:00
mach-tegra ARM: tegra: Core SoC changes for v4.5-rc1 2016-01-12 10:14:52 -08:00
mach-u300
mach-uniphier Merge branch 'treewide/cleanup' into next/soc 2015-12-22 13:10:00 -08:00
mach-ux500 ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zx
mach-zynq ARM: zynq: address L2 cache data corruption 2016-02-09 10:18:12 +01:00
mm tree wide: use kvfree() than conditional kfree()/vfree() 2016-01-22 17:02:18 -08:00
net ARM: net: bpf: fix zero right shift 2016-01-06 01:32:09 -05:00
nwfpe
oprofile
plat-iop
plat-omap
plat-orion
plat-pxa
plat-samsung ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
plat-versatile
probes
tools
vdso
vfp
xen xen/arm: set the system time in Xen via the XENPF_settime64 hypercall 2015-12-21 14:40:58 +00:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2016-01-21 12:32:08 -08:00
Kconfig-nommu
Kconfig.debug ARM: SoC fixes for v4.5 merge window 2016-01-22 17:26:00 -08:00
Makefile ARM: SoC defconfig updates for v4.5 2016-01-20 18:29:13 -08:00