diff options
author | Tom Rini <trini@konsulko.com> | 2021-09-27 11:09:23 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-27 11:09:23 -0400 |
commit | 1d1f98c8eed7bb4792300e655c2cb70136928f74 (patch) | |
tree | d08df140d52bd1298fa0e81ce908e2e09a880e5d /lib | |
parent | e908d20fcbd847e17345591fc171b59d9a156516 (diff) | |
parent | 933bf2644591281ed96f9d5771cbb35fe95bcb00 (diff) |
Merge tag 'dm-pull-next-27sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm into next
Various of-platdata improvements, including CONFIG_OF_REAL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 5 | ||||
-rw-r--r-- | lib/fdtdec.c | 44 |
2 files changed, 1 insertions, 48 deletions
diff --git a/lib/Makefile b/lib/Makefile index dfe772aaff5..09e380eb66c 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -80,10 +80,7 @@ obj-$(CONFIG_$(SPL_)LIB_RATIONAL) += rational.o obj-$(CONFIG_LIBAVB) += libavb/ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/ -ifneq ($(CONFIG_$(SPL_TPL_)BUILD)$(CONFIG_$(SPL_TPL_)OF_PLATDATA),yy) -obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += fdtdec_common.o -obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += fdtdec.o -endif +obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 7358cb6dd16..af92e65bde6 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -870,50 +870,6 @@ const u8 *fdtdec_locate_byte_array(const void *blob, int node, return cell; } -int fdtdec_get_config_int(const void *blob, const char *prop_name, - int default_val) -{ - int config_node; - - debug("%s: %s\n", __func__, prop_name); - config_node = fdt_path_offset(blob, "/config"); - if (config_node < 0) - return default_val; - return fdtdec_get_int(blob, config_node, prop_name, default_val); -} - -int fdtdec_get_config_bool(const void *blob, const char *prop_name) -{ - int config_node; - const void *prop; - - debug("%s: %s\n", __func__, prop_name); - config_node = fdt_path_offset(blob, "/config"); - if (config_node < 0) - return 0; - prop = fdt_get_property(blob, config_node, prop_name, NULL); - - return prop != NULL; -} - -char *fdtdec_get_config_string(const void *blob, const char *prop_name) -{ - const char *nodep; - int nodeoffset; - int len; - - debug("%s: %s\n", __func__, prop_name); - nodeoffset = fdt_path_offset(blob, "/config"); - if (nodeoffset < 0) - return NULL; - - nodep = fdt_getprop(blob, nodeoffset, prop_name, &len); - if (!nodep) - return NULL; - - return (char *)nodep; -} - u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells) { u64 number = 0; |