diff --git a/include/common.h b/include/common.h index 0fe9439a93..11e54595b1 100644 --- a/include/common.h +++ b/include/common.h @@ -62,6 +62,9 @@ typedef void (interrupt_handler_t)(void *); #define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN #endif +/* startup functions */ +#include + /* * Function Prototypes */ @@ -464,16 +467,6 @@ u32 cpu_mask (void); u32 cpu_dsp_mask(void); int is_core_valid (unsigned int); -/** - * arch_cpu_init() - basic cpu-dependent setup for an architecture - * - * This is called after early malloc is available. It should handle any - * CPU- or SoC- specific init needed to continue the init sequence. See - * board_f.c for where it is called. If this is not provided, a default - * version (which does nothing) will be used. - */ -int arch_cpu_init(void); - void s_init(void); int checkcpu (void); diff --git a/include/init.h b/include/init.h new file mode 100644 index 0000000000..324fbe0475 --- /dev/null +++ b/include/init.h @@ -0,0 +1,51 @@ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * Copy the startup prototype, previously defined in common.h + * Copyright (C) 2018, STMicroelectronics - All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __INIT_H_ +#define __INIT_H_ 1 + +#ifndef __ASSEMBLY__ /* put C only stuff in this section */ + +/* + * Function Prototypes + */ + +/* common/board_f.c */ + +/** + * arch_cpu_init() - basic cpu-dependent setup for an architecture + * + * This is called after early malloc is available. It should handle any + * CPU- or SoC- specific init needed to continue the init sequence. See + * board_f.c for where it is called. If this is not provided, a default + * version (which does nothing) will be used. + * + * @return: 0 on success, otherwise error + */ +int arch_cpu_init(void); + +/** + * mach_cpu_init() - SoC/machine dependent CPU setup + * + * This is called after arch_cpu_init(). It should handle any + * SoC or machine specific init needed to continue the init sequence. See + * board_f.c for where it is called. If this is not provided, a default + * version (which does nothing) will be used. + * + * @return: 0 on success, otherwise error + */ +int mach_cpu_init(void); + +/* common/board_r.c */ + +#endif /* __ASSEMBLY__ */ +/* Put only stuff here that the assembler can digest */ + +#endif /* __INIT_H_ */