env: Switch over to use environment location drivers
Move over to use a the master implementation of the location drivers, with
each method calling out to the appropriate driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/env/env.c b/env/env.c
index 9f0a04c..d327f9c 100644
--- a/env/env.c
+++ b/env/env.c
@@ -143,3 +143,23 @@
return 0;
}
+
+unsigned char env_get_char_spec(int index)
+{
+ return *(uchar *)(gd->env_addr + index);
+}
+
+void env_relocate_spec(void)
+{
+ env_load();
+}
+
+int saveenv(void)
+{
+ return env_save();
+}
+
+int env_init(void)
+{
+ return env_init_new();
+}