summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2015-02-24 19:40:36 +0300
committerAlexey Brodkin <abrodkin@synopsys.com>2015-04-03 09:47:49 +0300
commit3fb8016360d5433f3c4da51f8dd57550e7ef9018 (patch)
tree1cc2fe2a4723565e60279386122a35abe44cb36a /arch/arc/include/asm
parent8ee28251d95e237302c7c44929e59a813e147622 (diff)
downloadu-boot-3fb8016360d5433f3c4da51f8dd57550e7ef9018.tar.gz
u-boot-3fb8016360d5433f3c4da51f8dd57550e7ef9018.tar.xz
u-boot-3fb8016360d5433f3c4da51f8dd57550e7ef9018.zip
arc: clean-up init procedure
Intention behind this work was elimination of as much assembly-written code as it is possible. In case of ARC we already have relocation fix-up implemented in C so why don't we use C for U-Boot copying, .bss zeroing etc. It turned out x86 uses pretty similar approach so we re-used parts of code in "board_f.c" initially implemented for x86. Now assembly usage during init is limited to stack- and frame-pointer setup before and after relocation. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arc/include/asm')
-rw-r--r--arch/arc/include/asm/init_helpers.h12
-rw-r--r--arch/arc/include/asm/relocate.h16
-rw-r--r--arch/arc/include/asm/u-boot-arc.h3
3 files changed, 31 insertions, 0 deletions
diff --git a/arch/arc/include/asm/init_helpers.h b/arch/arc/include/asm/init_helpers.h
new file mode 100644
index 0000000000..7607e19561
--- /dev/null
+++ b/arch/arc/include/asm/init_helpers.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _ASM_ARC_INIT_HELPERS_H
+#define _ASM_ARC_INIT_HELPERS_H
+
+int init_cache_f_r(void);
+
+#endif /* _ASM_ARC_INIT_HELPERS_H */
diff --git a/arch/arc/include/asm/relocate.h b/arch/arc/include/asm/relocate.h
new file mode 100644
index 0000000000..4c5f923416
--- /dev/null
+++ b/arch/arc/include/asm/relocate.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _ASM_ARC_RELOCATE_H
+#define _ASM_ARC_RELOCATE_H
+
+#include <common.h>
+
+int copy_uboot_to_ram(void);
+int clear_bss(void);
+int do_elf_reloc_fixups(void);
+
+#endif /* _ASM_ARC_RELOCATE_H */
diff --git a/arch/arc/include/asm/u-boot-arc.h b/arch/arc/include/asm/u-boot-arc.h
index 0c0e8e661d..a56ccf1b5d 100644
--- a/arch/arc/include/asm/u-boot-arc.h
+++ b/arch/arc/include/asm/u-boot-arc.h
@@ -9,4 +9,7 @@
int arch_early_init_r(void);
+void board_init_f_r_trampoline(ulong) __attribute__ ((noreturn));
+void board_init_f_r(void) __attribute__ ((noreturn));
+
#endif /* __ASM_ARC_U_BOOT_ARC_H__ */