xref: /openbmc/u-boot/include/init.h (revision 71b75644)
1 /*
2  * (C) Copyright 2000-2009
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4  *
5  * Copy the startup prototype, previously defined in common.h
6  * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
7  *
8  * SPDX-License-Identifier:	GPL-2.0+
9  */
10 
11 #ifndef __INIT_H_
12 #define __INIT_H_	1
13 
14 #ifndef __ASSEMBLY__		/* put C only stuff in this section */
15 
16 /*
17  * Function Prototypes
18  */
19 
20 /* common/board_f.c */
21 
22 /**
23  * arch_cpu_init() - basic cpu-dependent setup for an architecture
24  *
25  * This is called after early malloc is available. It should handle any
26  * CPU- or SoC- specific init needed to continue the init sequence. See
27  * board_f.c for where it is called. If this is not provided, a default
28  * version (which does nothing) will be used.
29  *
30  * @return: 0 on success, otherwise error
31  */
32 int arch_cpu_init(void);
33 
34 /**
35  * mach_cpu_init() - SoC/machine dependent CPU setup
36  *
37  * This is called after arch_cpu_init(). It should handle any
38  * SoC or machine specific init needed to continue the init sequence. See
39  * board_f.c for where it is called. If this is not provided, a default
40  * version (which does nothing) will be used.
41  *
42  * @return: 0 on success, otherwise error
43  */
44 int mach_cpu_init(void);
45 
46 /* common/board_r.c */
47 
48 #endif	/* __ASSEMBLY__ */
49 /* Put only stuff here that the assembler can digest */
50 
51 #endif	/* __INIT_H_ */
52