aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/env.h15
-rw-r--r--include/env_default.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h
index b5731e4b9a..d5e2bcb530 100644
--- a/include/env.h
+++ b/include/env.h
@@ -375,4 +375,19 @@ int env_get_char(int index);
* This is used for those unfortunate archs with crappy toolchains
*/
void env_reloc(void);
+
+
+/**
+ * env_import_fdt() - Import environment values from device tree blob
+ *
+ * This uses the value of the environment variable "env_fdt_path" as a
+ * path to an fdt node, whose property/value pairs are added to the
+ * environment.
+ */
+#ifdef CONFIG_ENV_IMPORT_FDT
+void env_import_fdt(void);
+#else
+static inline void env_import_fdt(void) {}
+#endif
+
#endif
diff --git a/include/env_default.h b/include/env_default.h
index ea31a8eddf..1ddd64ba8f 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -103,6 +103,9 @@ const uchar default_environment[] = {
#ifdef CONFIG_SYS_SOC
"soc=" CONFIG_SYS_SOC "\0"
#endif
+#ifdef CONFIG_ENV_IMPORT_FDT
+ "env_fdt_path=" CONFIG_ENV_FDT_PATH "\0"
+#endif
#endif
#if defined(CONFIG_BOOTCOUNT_BOOTLIMIT) && (CONFIG_BOOTCOUNT_BOOTLIMIT > 0)
"bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0"