env: Create a location driver for each location
[oweals/u-boot.git] / env / dataflash.c
index c140b74c98d94dc53b6346dd7de228adf9811326..9c59d8e63acf678e5e1f1fb8ab3cab5f0d98d430 100644 (file)
@@ -82,3 +82,11 @@ int env_init(void)
 
        return 0;
 }
+
+U_BOOT_ENV_LOCATION(dataflash) = {
+       .location       = ENVL_DATAFLASH,
+       .get_char       = env_get_char_spec,
+       .load           = env_relocate_spec,
+       .save           = env_save_ptr(saveenv),
+       .init           = env_init,
+};