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>
diff --git a/board/maxbcm/maxbcm.c b/board/maxbcm/maxbcm.c
index e92132a..aad3dc8 100644
--- a/board/maxbcm/maxbcm.c
+++ b/board/maxbcm/maxbcm.c
@@ -112,13 +112,13 @@
 	/*
 	 * Setup some board specific mbus address windows
 	 */
-	mbus_dt_setup_win(&mbus_state, DEV_CS0_BASE, 16 << 20,
+	mbus_dt_setup_win(DEV_CS0_BASE, 16 << 20,
 			  CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_DEV_CS0);
-	mbus_dt_setup_win(&mbus_state, DEV_CS1_BASE, 16 << 20,
+	mbus_dt_setup_win(DEV_CS1_BASE, 16 << 20,
 			  CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_DEV_CS1);
-	mbus_dt_setup_win(&mbus_state, DEV_CS2_BASE, 16 << 20,
+	mbus_dt_setup_win(DEV_CS2_BASE, 16 << 20,
 			  CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_DEV_CS2);
-	mbus_dt_setup_win(&mbus_state, DEV_CS3_BASE, 16 << 20,
+	mbus_dt_setup_win(DEV_CS3_BASE, 16 << 20,
 			  CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_DEV_CS3);
 
 	return 0;