summaryrefslogtreecommitdiff
path: root/include/init.h
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2018-03-09 18:28:12 +0100
committerTom Rini <trini@konsulko.com>2018-03-16 14:54:14 -0400
commitdafa84d27c5f9d160b431665e09697bd392daca9 (patch)
treefd642e53a8910338bf7c2ce4f7274cd1fdeb050f /include/init.h
parent6f6b7cfa89e5aa3b643196a4ccc8b1ba5d6fa7a4 (diff)
common: add a prototype for mach_cpu_init()
Add a new file init.h with the prototype for arch_cpu_init Add a prototype for mach_cpu_init() to avoid a warning: no previous prototype for ‘mach_cpu_init’ It is a first step to move all the functions prototype used during U-Boot initialization (board_f.c / board_r.c) from common.h to init.h Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'include/init.h')
-rw-r--r--include/init.h51
1 files changed, 51 insertions, 0 deletions
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_ */