X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Ffdt_support.h;h=ae5e8a3ef6366f2d5ad29b5a0a788170b5b668a9;hb=f643d9294f45487f22e8f33d6572530f17eff4e9;hp=c3d1fbcf3566451419bff1a325a870a945743475;hpb=4b19b7448e63bab8af17abbb30acff00d8f0dc99;p=oweals%2Fu-boot.git diff --git a/include/fdt_support.h b/include/fdt_support.h index c3d1fbcf35..ae5e8a3ef6 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -64,7 +64,20 @@ static inline void fdt_fixup_crypto_node(void *blob, int sec_rev) {} int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose); #endif -void ft_board_setup(void *blob, bd_t *bd); +int fdt_find_or_add_subnode(void *fdt, int parentoffset, const char *name); + +/** + * Add board-specific data to the FDT before booting the OS. + * + * Use CONFIG_SYS_FDT_PAD to ensure there is sufficient space. + * This function is called if CONFIG_OF_BOARD_SETUP is defined + * + * @param blob FDT blob to update + * @param bd_t Pointer to board data + * @return 0 if ok, or -FDT_ERR_... on error + */ +int ft_board_setup(void *blob, bd_t *bd); + /* * The keystone2 SOC requires all 32 bit aliased addresses to be converted * to their 36 physical format. This has to happen after all fdt nodes @@ -75,7 +88,19 @@ void ft_board_setup_ex(void *blob, bd_t *bd); void ft_cpu_setup(void *blob, bd_t *bd); void ft_pci_setup(void *blob, bd_t *bd); -void set_working_fdt_addr(void *addr); +/** + * Add system-specific data to the FDT before booting the OS. + * + * Use CONFIG_SYS_FDT_PAD to ensure there is sufficient space. + * This function is called if CONFIG_OF_SYSTEM_SETUP is defined + * + * @param blob FDT blob to update + * @param bd_t Pointer to board data + * @return 0 if ok, or -FDT_ERR_... on error + */ +int ft_system_setup(void *blob, bd_t *bd); + +void set_working_fdt_addr(ulong addr); int fdt_shrink_to_minimum(void *blob); int fdt_increase_size(void *fdt, int add_len); @@ -144,6 +169,11 @@ static inline u64 of_read_number(const fdt32_t *cell, int size) void of_bus_default_count_cells(void *blob, int parentoffset, int *addrc, int *sizec); +int ft_verify_fdt(void *fdt); +int arch_fixup_memory_node(void *blob); + +int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width, + u32 height, u32 stride, const char *format); #endif /* ifdef CONFIG_OF_LIBFDT */