summaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-08-10 14:46:09 +0200
committerStefan Roese <sr@denx.de>2022-08-23 12:35:37 +0200
commit5692e5b2445b5e45d463e9e21c7a296ee4d3d96c (patch)
tree99371a75db315d6275087b7aada4fb6c02d871cc /arch/arm/mach-kirkwood
parentc02eff8fcf05ca61db7794c2d5dbee7ff5abb6f5 (diff)
downloadu-boot-5692e5b2445b5e45d463e9e21c7a296ee4d3d96c.tar.gz
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>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/include/mach/cpu.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm/mach-kirkwood/include/mach/cpu.h b/arch/arm/mach-kirkwood/include/mach/cpu.h
index 71c546f9ac..d8639c6035 100644
--- a/arch/arm/mach-kirkwood/include/mach/cpu.h
+++ b/arch/arm/mach-kirkwood/include/mach/cpu.h
@@ -144,9 +144,6 @@ struct kwgpio_registers {
u32 irq_level;
};
-/* Needed for dynamic (board-specific) mbus configuration */
-extern struct mvebu_mbus_state mbus_state;
-
/*
* functions
*/