env: Create a location driver for each location
[oweals/u-boot.git] / env / eeprom.c
index ac6b30fa8fc3fc6ae1f7b3a2b664e1eb231bc511..78569b286b058f62d66b0a3f4e4628867ca57fd8 100644 (file)
@@ -243,3 +243,11 @@ int env_init(void)
        gd->env_valid = ENV_VALID;
        return 0;
 }
+
+U_BOOT_ENV_LOCATION(eeprom) = {
+       .location       = ENVL_EEPROM,
+       .get_char       = env_get_char_spec,
+       .load           = env_relocate_spec,
+       .save           = env_save_ptr(saveenv),
+       .init           = env_init,
+};