u-boot-brain/arch/arm
Marek Vasut 476abb72e0 ARM: socfpga: Clear PL310 early in SPL
On SoCFPGA A10 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: Chin Liang See <chin.liang.see@intel.com>
Cc: Dalon Westergreen <dwesterg@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
2019-05-24 00:01:08 +02:00
..
cpu armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE. 2019-05-22 12:24:24 +05:30
dts arm: dts: fsl-ls1028a: add sp805 watchdog node 2019-05-22 12:24:24 +05:30
include armv8: ls1028a: Add NXP LS1028A SoC support 2019-05-22 12:24:24 +05:30
lib CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-aspeed regmap: change regmap_init_mem() to take ofnode instead udevice 2018-05-07 15:49:51 -04:00
mach-at91 spl: fix linker size check off-by-one errors 2019-05-05 08:48:50 -04:00
mach-bcm283x arm: Kconfig: spelling fixes 2019-01-18 09:16:15 -05:00
mach-bcmstb board: arm: Add support for Broadcom BCM7260 2018-09-10 21:19:31 -04:00
mach-davinci arm: davinci: remove leftover code for dm* SoCs 2019-05-04 13:04:10 -04:00
mach-exynos CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-highbank SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-imx CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-integrator env: Convert CONFIG_ENV_IS_IN... to a choice 2017-08-15 20:50:01 -04:00
mach-k3 arm: k3: config.mk: Use k3_gen_x509_cert.sh to generate boot images 2019-05-09 20:22:05 -04:00
mach-keystone CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-kirkwood CONFIG_SYS_[DI]CACHE_OFF: convert to Kconfig 2019-05-18 08:15:34 -04:00
mach-mediatek ARM: mediatek: mt8516: use PSCI to reset the SoC 2019-05-18 12:32:00 -04:00
mach-meson mach-meson: g12a: add DWC2 peripheral mode support 2019-05-09 10:38:32 +02:00
mach-mvebu arm: mvebu: Add CRS305-1G-4S board 2019-05-09 07:35:04 +02:00
mach-omap2 CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-orion5x arm: remove prototype for get_timer_masked 2018-10-10 13:35:09 -04:00
mach-owl board: Add uCRobotics Bubblegum-96 board support 2018-07-09 15:25:23 -04:00
mach-qemu Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-rmobile CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-rockchip CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-s5pc1xx CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-snapdragon arm: mach-snapdragon: pinctrl: clarify gpio disable bit 2019-01-25 12:12:56 -05:00
mach-socfpga ARM: socfpga: Clear PL310 early in SPL 2019-05-24 00:01:08 +02:00
mach-sti board: Add STMicroelectronics STiH410-B2260 support 2017-03-14 20:40:21 -04:00
mach-stm32 mach-stm32: Add MPU region for spi-nor memory mapped region 2019-05-06 09:50:19 +02:00
mach-stm32mp stm32mp1: add command poweroff 2019-04-12 16:09:13 +02:00
mach-sunxi Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2019-05-20 13:53:51 -04:00
mach-tegra CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-uniphier ARM: uniphier: do not modify bootcmd environment variable at run-time 2018-12-29 11:38:33 +09:00
mach-versal arm64: versal: Move IOU_SWITCH_DIVISOR0 to Kconfig 2019-02-14 14:31:10 +01:00
mach-versatile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-zynq CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mach-zynqmp arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI 2019-04-16 11:52:02 +02:00
mach-zynqmp-r5 arm: zynqmp: Add ZynqMP minimal R5 support 2018-05-11 09:38:23 +02:00
thumb1/include/asm/proc-armv SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
config.mk efi_loader: Rename sections to allow for implicit data 2018-07-25 14:57:44 +02:00
Kconfig armv8: ls1028aqds: Add support of LS1028AQDS 2019-05-22 12:24:24 +05:30
Kconfig.debug
Makefile arm: imx: build mach-imx for i.MX8 2019-01-28 20:35:47 +01:00