X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Finit.h;h=d40d11f33d22770b4fccce49962f29126e3bad4b;hb=c56289ddafce3d1ec442fb18064f136c2c47d0bb;hp=c781789e367edd3a64cb6401112adb5e159cf2e7;hpb=aba3fa1d3f1dc8f7049317b8d6ea1d8cb8935e5e;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/init.h b/include/init.h index c781789..d40d11f 100644 --- a/include/init.h +++ b/include/init.h @@ -14,8 +14,11 @@ #include -/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ -#ifdef CONFIG_EFI_STUB +/* + * In case of the EFI app the UEFI firmware provides the low-level + * initialisation. + */ +#ifdef CONFIG_EFI #define ll_boot_init() false #else #include @@ -43,17 +46,6 @@ void board_init_f(ulong dummy); int arch_cpu_init(void); /** - * arch_cpu_init_dm() - init CPU after driver model is available - * - * This is called immediately after driver model is available before - * relocation. This is similar to arch_cpu_init() but is able to reference - * devices - * - * Return: 0 if OK, -ve on error - */ -int arch_cpu_init_dm(void); - -/** * mach_cpu_init() - SoC/machine dependent CPU setup * * This is called after arch_cpu_init(). It should handle any @@ -112,6 +104,19 @@ phys_size_t get_effective_memsize(void); int testdram(void); /** + * arch_setup_dest_addr() - Fix up initial reloc address + * + * This is called in generic board init sequence in common/board_f.c at the end + * of the setup_dest_addr() initcall. Each architecture could provide this + * function to make adjustments to the initial reloc address. + * + * If an implementation is not provided, it will just be a nop stub. + * + * Return: 0 if OK + */ +int arch_setup_dest_addr(void); + +/** * arch_reserve_stacks() - Reserve all necessary stacks * * This is used in generic board init sequence in common/board_f.c. Each @@ -163,6 +168,19 @@ int arch_setup_bdinfo(void); */ int setup_bdinfo(void); +#if defined(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) || \ +defined(CONFIG_SAVE_PREV_BL_FDT_ADDR) +/** + * save_prev_bl_data - Save prev bl data in env vars. + * + * When u-boot is chain-loaded, save previous bootloader data, + * like initramfs address to environment variables. + * + * Return: 0 if ok; -ENODATA on error + */ +int save_prev_bl_data(void); +#endif + /** * cpu_secondary_init_r() - CPU-specific secondary initialization * @@ -214,7 +232,6 @@ int init_cache_f_r(void); int print_cpuinfo(void); #endif int timer_init(void); -int misc_init_f(void); #if defined(CONFIG_DTB_RESELECT) int embedded_dtb_select(void); @@ -287,7 +304,7 @@ int show_board_info(void); * * @param total_size Size of U-Boot (unused?) */ -ulong board_get_usable_ram_top(ulong total_size); +phys_size_t board_get_usable_ram_top(phys_size_t total_size); int board_early_init_f(void); @@ -308,6 +325,16 @@ int board_early_init_r(void); int arch_initr_trap(void); /** + * init_addr_map() + * + * Initialize non-identity virtual-physical memory mappings for 32bit CPUs. + * It is called during the generic board init sequence, after relocation. + * + * Return: 0 if OK + */ +int init_addr_map(void); + +/** * main_loop() - Enter the main loop of U-Boot * * This normally runs the command line. @@ -329,9 +356,24 @@ void bdinfo_print_num_ll(const char *name, unsigned long long value); /* Print a clock speed in MHz */ void bdinfo_print_mhz(const char *name, unsigned long hz); +/** + * bdinfo_print_size - print size variables in bdinfo format + * @name: string to print before the size + * @size: size to print + * + * Helper function for displaying size variables as properly formatted bdinfo + * entries. The size is printed as "xxx Bytes", "xxx KiB", "xxx MiB", + * "xxx GiB", etc. as needed; + * + * For use in arch_print_bdinfo(). + */ +void bdinfo_print_size(const char *name, uint64_t size); + /* Show arch-specific information for the 'bd' command */ void arch_print_bdinfo(void); +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */