u-boot/arch/arm/mach-mvebu
Pali Rohár 5818198e6a arm: mvebu: Fix moving internal registers
Commit 5bb2c550b1 ("arm: mvebu: Move internal registers in
arch_very_early_init() function") moved code from file cpu.c to lowlevel.c,
which moves Marvell internal registers from address INTREG_BASE_ADDR_REG to
SOC_REGS_PHY_BASE.

But the steps describing how to do it correctly were documented only in
older U-Boot versions and commit cefd764222 ("arm: mvebu: Fix internal
register config on A38x") probably unintentionally removed important
details about MMU from code comments around.

Commit 5bb2c550b1 ("arm: mvebu: Move internal registers in
arch_very_early_init() function") implemented code movement according to
(now incomplete) comments which resulted in semi-broken code.

The result is that I-cache is currently disabled for all Armada 38x boards
and maybe there are some other (unreported / undetected) issues.

Reimplement it correctly. First flush all caches, then disable MMU and L2
cache and then move Marvell internal registers. There is no need to
explicitly disable I-cache.

After this change lzmadec command with lzma image of 0x7000000 bytes is
doing decompression just 5 seconds. Before this change it was 30 seconds.

To make lowlevel.S code more readable, extend asm/pl310.h header file to be
compatible with assembler and use macros from this file.

Fixes: 5bb2c550b1 ("arm: mvebu: Move internal registers in arch_very_early_init() function")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-13 09:04:22 +02:00
..
armada8k arm64: mvebu: extend the mmio region 2021-05-16 06:48:45 +02:00
armada3700 treewide: Fix Marek's name and change my e-mail address 2022-07-21 10:14:04 +02:00
include/mach arm: mvebu: Mark constant data with const keyword 2022-09-13 06:38:08 +02:00
serdes arm: mvebu: Mark constant data with const keyword 2022-09-13 06:38:08 +02:00
.gitignore mvebu: select boot device at SoC level 2018-08-06 14:07:23 +02:00
arm64-common.c arm64: mvebu: handle non-zero base address for RAM 2022-07-21 07:46:10 +02:00
cpu.c arm: mvebu: Fix moving internal registers 2022-09-13 09:04:22 +02:00
dram.c arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times 2022-07-21 10:14:04 +02:00
efuse.c arm: mvebu: Add support for reading LD0 and LD1 eFuse 2022-04-21 12:31:36 +02:00
gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig arm: mvebu: Move internal registers in arch_very_early_init() function 2022-05-16 11:31:34 +02:00
kwbimage.cfg.in arm: mvebu: Enable BootROM output on A38x 2022-01-14 11:39:16 +01:00
lowlevel.S arm: mvebu: Fix moving internal registers 2022-09-13 09:04:22 +02:00
lowlevel_spl.S mvebu: Use CONFIG_SPL_STACK + 4 directly for bootparam location 2022-06-06 12:09:12 -04:00
Makefile arm: kirkwood: make it CONFIG_TIMER aware 2022-08-23 12:38:54 +02:00
mbus.c arm: mvebu: Mark constant data with const keyword 2022-09-13 06:38:08 +02:00
spl.c arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL 2022-08-23 10:48:59 +02:00
system-controller.c arm: mvebu: Mark constant data with const keyword 2022-09-13 06:38:08 +02:00
timer.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00