X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Finit.h;h=fd51d7f9667102c61c42bc0c733a7a040a203ddb;hb=bbcacdf4cd23f2e5deb9ef916096c956c955243d;hp=e727031514c1c63a8818d1b93ea871d5d0477560;hpb=59b0d7d839f135bc44d3459784337a657149f8b3;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/init.h b/include/init.h index e727031..fd51d7f 100644 --- a/include/init.h +++ b/include/init.h @@ -10,16 +10,16 @@ #ifndef __INIT_H_ #define __INIT_H_ 1 -#include - -struct global_data; - #ifndef __ASSEMBLY__ /* put C only stuff in this section */ +#include + /* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ #ifdef CONFIG_EFI_STUB #define ll_boot_init() false #else +#include + #define ll_boot_init() (!(gd->flags & GD_FLG_SKIP_LL_INIT)) #endif @@ -142,6 +142,63 @@ int arch_reserve_stacks(void); int arch_reserve_mmu(void); /** + * arch_setup_bdinfo() - Architecture dependent boardinfo setup + * + * Architecture-specific routine for populating various boardinfo fields of + * gd->bd. It is called during the generic board init sequence. + * + * If an implementation is not provided, it will just be a nop stub. + * + * Return: 0 if OK + */ +int arch_setup_bdinfo(void); + +/** + * setup_bdinfo() - Generic boardinfo setup + * + * Routine for populating various generic boardinfo fields of + * gd->bd. It is called during the generic board init sequence. + * + * Return: 0 if OK + */ +int setup_bdinfo(void); + +/** + * cpu_secondary_init_r() - CPU-specific secondary initialization + * + * After non-volatile devices, environment and cpu code are setup, have + * another round to deal with any initialization that might require + * full access to the environment or loading of some image (firmware) + * from a non-volatile device. + * + * It is called during the generic post-relocation init sequence. + * + * Return: 0 if OK + */ +int cpu_secondary_init_r(void); + +/** + * pci_ep_init() - Initialize pci endpoint devices + * + * It is called during the generic post-relocation init sequence. + * + * Return: 0 if OK + */ +int pci_ep_init(void); + +/** + * pci_init() - Enumerate pci devices + * + * It is called during the generic post-relocation init sequence to enumerate + * pci buses. This is needed, for instance, in the case of DM PCI-based + * Ethernet devices, which will not be detected without having the enumeration + * performed earlier. + * + * Return: 0 if OK + */ +int pci_init(void); + +/** * init_cache_f_r() - Turn on the cache in preparation for relocation * * Return: 0 if OK, -ve on error @@ -212,7 +269,6 @@ 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); @@ -244,7 +300,15 @@ int board_early_init_r(void); /* TODO(sjg@chromium.org): Drop this when DM_PCI migration is completed */ void pci_init_board(void); -void trap_init(unsigned long reloc_addr); +/** + * arch_initr_trap() - Init traps + * + * Arch specific routine for initializing traps. It is called during the + * generic board init sequence, after relocation. + * + * Return: 0 if OK + */ +int arch_initr_trap(void); /** * main_loop() - Enter the main loop of U-Boot @@ -262,7 +326,8 @@ void relocate_code(ulong start_addr_sp, struct global_data *new_gd, #endif /* Print a numeric value (for use in arch_print_bdinfo()) */ -void bdinfo_print_num(const char *name, ulong value); +void bdinfo_print_num_l(const char *name, ulong value); +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);