+int calculate_relocation_address(void)
+{
+ ulong text_start = (ulong)&__text_start;
+ ulong bss_end = (ulong)&__bss_end;
+ ulong dest_addr;
+
+ /*
+ * NOTE: All destination address are rounded down to 16-byte
+ * boundary to satisfy various worst-case alignment
+ * requirements
+ */
+
+ /* Stack is at top of available memory */
+ dest_addr = gd->ram_size;
+ gd->start_addr_sp = dest_addr;
+
+ /* U-Boot is below the stack */
+ dest_addr -= CONFIG_SYS_STACK_SIZE;
+ dest_addr -= (bss_end - text_start);
+ dest_addr &= ~15;
+ gd->relocaddr = dest_addr;
+ gd->reloc_off = (dest_addr - text_start);
+
+ return 0;
+}
+
+int init_cache_f_r(void)
+{
+ /* Initialise the CPU cache(s) */
+ return init_cache();
+}
+
+int set_reloc_flag_r(void)
+{
+ gd->flags = GD_FLG_RELOC;
+
+ return 0;
+}
+