]> git.sur5r.net Git - u-boot/blobdiff - include/init.h
Merge branch 'master' of git://git.denx.de/u-boot-ubi
[u-boot] / include / init.h
index f57a438986efd7165d3ab6efae884d5f8da87e7a..f114a889631832177ec05ba211f6bbad3c1d0c0c 100644 (file)
@@ -1,11 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * (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_
@@ -101,6 +100,13 @@ int dram_init_banksize(void);
  */
 int arch_reserve_stacks(void);
 
+/**
+ * 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);
+
 int print_cpuinfo(void);
 int timer_init(void);
 int reserve_mmu(void);
@@ -109,7 +115,63 @@ int misc_init_f(void);
 int embedded_dtb_select(void);
 #endif
 
+/* common/init/board_init.c */
+extern ulong monitor_flash_len;
+
+/**
+ * ulong board_init_f_alloc_reserve - allocate reserved area
+ *
+ * This function is called by each architecture very early in the start-up
+ * code to allow the C runtime to reserve space on the stack for writable
+ * 'globals' such as GD and the malloc arena.
+ *
+ * @top:       top of the reserve area, growing down.
+ * @return:    bottom of reserved area
+ */
+ulong board_init_f_alloc_reserve(ulong top);
+
+/**
+ * board_init_f_init_reserve - initialize the reserved area(s)
+ *
+ * This function is called once the C runtime has allocated the reserved
+ * area on the stack. It must initialize the GD at the base of that area.
+ *
+ * @base:      top from which reservation was done
+ */
+void board_init_f_init_reserve(ulong base);
+
+/**
+ * arch_setup_gd() - Set up the global_data pointer
+ *
+ * This pointer is special in some architectures and cannot easily be assigned
+ * to. For example on x86 it is implemented by adding a specific record to its
+ * Global Descriptor Table! So we we provide a function to carry out this task.
+ * For most architectures this can simply be:
+ *
+ *    gd = gd_ptr;
+ *
+ * @gd_ptr:    Pointer to global data
+ */
+void arch_setup_gd(gd_t *gd_ptr);
+
 /* common/board_r.c */
+void board_init_r(gd_t *id, ulong dest_addr) __attribute__ ((noreturn));
+
+int cpu_init_r(void);
+int last_stage_init(void);
+int mac_read_from_eeprom(void);
+int set_cpu_clk_info(void);
+int update_flash_size(int flash_size);
+int arch_early_init_r(void);
+void pci_init(void);
+int misc_init_r(void);
+#if defined(CONFIG_VID)
+int init_func_vid(void);
+#endif
+
+/* common/board_info.c */
+int checkboard(void);
+int show_board_info(void);
 
 #endif /* __ASSEMBLY__ */
 /* Put only stuff here that the assembler can digest */