X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ffdt_support.h;h=27fe564f0b6b497c21b4e628ecf155454014dac2;hb=0223462b373b975d970fa86e5e1a7eadd1d41820;hp=76ef5b70d785c6b00201bace3d037b7f2e2306d6;hpb=b08c8c4870831c9315dcae237772238e80035bd5;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/fdt_support.h b/include/fdt_support.h index 76ef5b7..27fe564 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2007 * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __FDT_SUPPORT_H @@ -206,11 +205,16 @@ int fdt_increase_size(void *fdt, int add_len); int fdt_fixup_nor_flash_size(void *blob); +struct node_info; #if defined(CONFIG_FDT_FIXUP_PARTITIONS) -void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size); +void fdt_fixup_mtdparts(void *fdt, const struct node_info *node_info, + int node_info_size); #else -static inline void fdt_fixup_mtdparts(void *fdt, void *node_info, - int node_info_size) {} +static inline void fdt_fixup_mtdparts(void *fdt, + const struct node_info *node_info, + int node_info_size) +{ +} #endif void fdt_del_node_and_alias(void *blob, const char *alias); @@ -284,6 +288,16 @@ int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width, int fdt_overlay_apply_verbose(void *fdt, void *fdto); +/** + * fdt_get_cells_len() - Get the length of a type of cell in top-level nodes + * + * Returns the length of the cell type in bytes (4 or 8). + * + * @blob: Pointer to device tree blob + * @nr_cells_name: Name to lookup, e.g. "#address-cells" + */ +int fdt_get_cells_len(const void *blob, char *nr_cells_name); + #endif /* ifdef CONFIG_OF_LIBFDT */ #ifdef USE_HOSTCC