summaryrefslogtreecommitdiff
path: root/env/mmc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 07:24:01 -0600
committerSimon Glass <sjg@chromium.org>2021-09-25 09:46:15 -0600
commit7de8bd03c37af6120cf5bba9bf1adb492ed56868 (patch)
tree03d977384b888feedf77e0d274f7682d732d6be9 /env/mmc.c
parentbb38d77ca779cc8bdad3d4ceb6cecc687f4987c2 (diff)
downloadu-boot-7de8bd03c37af6120cf5bba9bf1adb492ed56868.tar.gz
u-boot-7de8bd03c37af6120cf5bba9bf1adb492ed56868.tar.bz2
u-boot-7de8bd03c37af6120cf5bba9bf1adb492ed56868.zip
treewide: fdt: Move fdt_get_config_... to ofnode_conf_read...
The current API is outdated as it requires a devicetree pointer. Move these functions to use the ofnode API and update this globally. Add some tests while we are here. Correct the call in exynos_dsim_config_parse_dt() which is obviously wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'env/mmc.c')
-rw-r--r--env/mmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/env/mmc.c b/env/mmc.c
index 09e94f0bd3..c4cb163991 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -19,6 +19,7 @@
#include <part.h>
#include <search.h>
#include <errno.h>
+#include <dm/ofnode.h>
#define __STR(X) #X
#define STR(X) __STR(X)
@@ -73,7 +74,7 @@ static inline s64 mmc_offset(int copy)
int err;
/* look for the partition in mmc CONFIG_SYS_MMC_ENV_DEV */
- str = fdtdec_get_config_string(gd->fdt_blob, dt_prop.partition);
+ str = ofnode_conf_read_str(dt_prop.partition);
if (str) {
/* try to place the environment at end of the partition */
err = mmc_offset_try_partition(str, copy, &val);
@@ -90,7 +91,7 @@ static inline s64 mmc_offset(int copy)
propname = dt_prop.offset_redund;
}
#endif
- return fdtdec_get_config_int(gd->fdt_blob, propname, defvalue);
+ return ofnode_conf_read_int(propname, defvalue);
}
#else
static inline s64 mmc_offset(int copy)