]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board_f: Make init_helpers generic
authorSimon Glass <sjg@chromium.org>
Fri, 31 Mar 2017 14:40:37 +0000 (08:40 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 20:36:56 +0000 (16:36 -0400)
This header file is used by two archs. It could be used by all of them
since it allows the cache to be on during relocation. Move it into a
generic file.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arc/include/asm/init_helpers.h [deleted file]
arch/x86/lib/spl.c
common/board_f.c
common/board_r.c
include/init_helpers.h [moved from arch/x86/include/asm/init_helpers.h with 56% similarity]

diff --git a/arch/arc/include/asm/init_helpers.h b/arch/arc/include/asm/init_helpers.h
deleted file mode 100644 (file)
index 7607e19..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * 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 */
index ed2d40b5523b765bfe1548307c2f9c23471d090e..2b1b450737b1a53e65c93af0f7080d080acbfb57 100644 (file)
@@ -6,9 +6,9 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init_helpers.h>
 #include <spl.h>
 #include <asm/cpu.h>
-#include <asm/init_helpers.h>
 #include <asm/mtrr.h>
 #include <asm/processor.h>
 #include <asm-generic/sections.h>
index bafe3aa49ce268c36f64932ebaf64d0bec0937e1..f928c3dc736452e7b9265e47e45068c1d29af7e5 100644 (file)
@@ -18,6 +18,7 @@
 #include <fs.h>
 #include <i2c.h>
 #include <initcall.h>
+#include <init_helpers.h>
 #include <logbuff.h>
 #include <malloc.h>
 #include <mapmem.h>
@@ -46,9 +47,6 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <asm/sections.h>
-#if defined(CONFIG_X86) || defined(CONFIG_ARC)
-#include <asm/init_helpers.h>
-#endif
 #if defined(CONFIG_X86) || defined(CONFIG_ARC) || defined(CONFIG_XTENSA)
 #include <asm/relocate.h>
 #endif
index c8eeb9cbd4a5f7f1919988bd02f5714248311b4b..d69a33c4a3fdf5daac5d99537a508f31e2e0b9f3 100644 (file)
@@ -27,6 +27,7 @@
 #include <ide.h>
 #endif
 #include <initcall.h>
+#include <init_helpers.h>
 #ifdef CONFIG_PS2KBD
 #include <keyboard.h>
 #endif
@@ -53,9 +54,6 @@
 #include <asm/mmu.h>
 #endif
 #include <asm/sections.h>
-#ifdef CONFIG_X86
-#include <asm/init_helpers.h>
-#endif
 #include <dm/root.h>
 #include <linux/compiler.h>
 #include <linux/err.h>
similarity index 56%
rename from arch/x86/include/asm/init_helpers.h
rename to include/init_helpers.h
index ef05ac47813a6db75233b94788a73fa78d60395e..3efcfddb7b3ef114a0f5293cc974d40e621fb167 100644 (file)
@@ -8,6 +8,11 @@
 #ifndef _INIT_HELPERS_H_
 #define _INIT_HELPERS_H_
 
+/**
+ * init_cache_f_r() - Turn on the cache in preparation for relocation
+ *
+ * @return 0 if OK, -ve on error
+ */
 int init_cache_f_r(void);
 
-#endif /* !_INIT_HELPERS_H_ */
+#endif /* _INIT_HELPERS_H_ */