From: Simon Glass Date: Fri, 31 Mar 2017 14:40:37 +0000 (-0600) Subject: board_f: Make init_helpers generic X-Git-Tag: v2017.05-rc2~87 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=96d4b75c0d7f1bbbbde19e6225b09b1f7e7b60fe;p=u-boot board_f: Make init_helpers generic 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 --- diff --git a/arch/arc/include/asm/init_helpers.h b/arch/arc/include/asm/init_helpers.h deleted file mode 100644 index 7607e19561..0000000000 --- a/arch/arc/include/asm/init_helpers.h +++ /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 */ diff --git a/arch/x86/include/asm/init_helpers.h b/arch/x86/include/asm/init_helpers.h deleted file mode 100644 index ef05ac4781..0000000000 --- a/arch/x86/include/asm/init_helpers.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * (C) Copyright 2011 - * Graeme Russ, - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _INIT_HELPERS_H_ -#define _INIT_HELPERS_H_ - -int init_cache_f_r(void); - -#endif /* !_INIT_HELPERS_H_ */ diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index ed2d40b552..2b1b450737 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -6,9 +6,9 @@ #include #include +#include #include #include -#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index bafe3aa49c..f928c3dc73 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -46,9 +47,6 @@ #include #include #include -#if defined(CONFIG_X86) || defined(CONFIG_ARC) -#include -#endif #if defined(CONFIG_X86) || defined(CONFIG_ARC) || defined(CONFIG_XTENSA) #include #endif diff --git a/common/board_r.c b/common/board_r.c index c8eeb9cbd4..d69a33c4a3 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -27,6 +27,7 @@ #include #endif #include +#include #ifdef CONFIG_PS2KBD #include #endif @@ -53,9 +54,6 @@ #include #endif #include -#ifdef CONFIG_X86 -#include -#endif #include #include #include diff --git a/include/init_helpers.h b/include/init_helpers.h new file mode 100644 index 0000000000..3efcfddb7b --- /dev/null +++ b/include/init_helpers.h @@ -0,0 +1,18 @@ +/* + * (C) Copyright 2011 + * Graeme Russ, + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#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_ */