u-boot-brain/arch
Marek Vasut 4a9743f73c ARM: socfpga: Clear PL310 early in SPL
On SoCFPGA Gen5 systems, it can rarely happen that a reboot from Linux
will result in stale data in PL310 L2 cache controller. Even if the L2
cache controller is disabled via the CTRL register CTRL_EN bit, those
data can interfere with operation of devices using DMA, like e.g. the
DWMMC controller. This can in turn cause e.g. SPL to fail reading data
from SD/MMC.

The obvious solution here would be to fully reset the L2 cache controller
via the reset manager MPUMODRST L2 bit, however this causes bus hang even
if executed entirely from L1 I-cache to avoid generating any bus traffic
through the L2 cache controller.

This patch thus configures and enables the L2 cache controller very early
in the SPL boot process, clears the L2 cache and disables the L2 cache
controller again.

The reason for doing it in SPL is because we need to avoid accessing any
of the potentially stale data in the L2 cache, and we are certain any of
the stale data will be below the OCRAM address range. To further reduce
bus traffic during the L2 cache invalidation, we enable L1 I-cache and
run the invalidation code entirely out of the L1 I-cache.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dalon Westergreen <dwesterg@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
2019-02-25 16:07:36 +01:00
..
arc ARC: cache: define CONFIG_SYS_CACHELINE_SIZE as ARCH_DMA_MINALIGN 2019-01-25 08:41:09 +03:00
arm ARM: socfpga: Clear PL310 early in SPL 2019-02-25 16:07:36 +01:00
m68k m68k: ColdFire mcf5441x, add eSDHC support 2018-09-16 00:01:13 +02:00
microblaze arch: types.h: factor out fixed width typedefs to int-ll64.h 2018-09-10 20:48:16 -04:00
mips dt: bcm6838: add watchdog 2019-02-09 07:50:50 -05:00
nds32 nds32: dts: Fix mmc node compatible string 2019-01-22 17:36:20 +08:00
nios2 .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore 2018-06-18 14:43:12 -04:00
powerpc linker: Modify linker scripts to be more generic 2019-01-26 22:55:53 -05:00
riscv riscv: qemu: define standalone load address 2019-01-15 09:36:31 +08:00
sandbox sandbox: sound: Silence sound for testing 2019-02-20 15:27:09 +08:00
sh sh: bitops: add hweight*() macros 2019-02-07 15:33:21 +05:30
x86 x86: Add sound support for samus 2019-02-20 15:27:11 +08:00
xtensa xtensa: use asm-generic/atomic.h 2018-09-25 21:49:18 -04:00
.gitignore
Kconfig x86: sandbox: pch: Add a CONFIG option for PCH 2019-02-20 15:25:30 +08:00