u-boot/arch/arm/mach-mvebu/include/mach
Pali Rohár 5692e5b244 arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation
mbus driver is initialized from arch_cpu_init() callback which is called
before relocation. This driver stores lot of functions and structure
pointers into global variables, so it is data position dependent.

Therefore after relocations all pointers are invalid and driver does not
work anymore as all pointers referes to the old memory, which overlaps with
CONFIG_SYS_LOAD_ADDR and ${loadaddr}.

For example U-Boot fuse command crashes if loadaddr memory is cleared or
rewritten by some image loaded by U-Boot load command.

  mw.w ${loadaddr} 0x0 10000
  fuse read 0 1 2

Fix this issue by removing of all mbus global variables in which are stored
pointers to structures or functions which changes during relocation. And
replace it by direct function calls (not via pointers). With this change
fuse command finally works.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:35:37 +02:00
..
config.h Migrate CUSTOM_SYS_INIT_SP_ADDR to Kconfig using system-constants.h 2022-06-06 12:09:19 -04:00
cpu.h arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation 2022-08-23 12:35:37 +02:00
efuse.h arm: mvebu: Add support for reading LD0 and LD1 eFuse 2022-04-21 12:31:36 +02:00
fw_info.h arm64: mvebu: extend the mmio region 2021-05-16 06:48:45 +02:00
gpio.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mbox.h treewide: Fix Marek's name and change my e-mail address 2022-07-21 10:14:04 +02:00
soc.h mvebu: Move BOOTROM_ERR_REG out of CONFIG namespace 2022-04-08 09:05:19 -04:00